I tried googling this but can't find anything. I'm just curious as to why we use the folder name 'com' as the root directory? what does it stand for? computer? haha. thanks
Generally ".com" stands for a commercial solution. In this case I suppose that the package is part of a commercial API.
Assuming you're talking about java packages, the package name is a reverse of the domain name of the package provider. So, packages from "sun.com" are named "com.sun.*". If there were a "sun.org" or 'sun.net", those packages would be named "org.sun.*" or "net.sun.*"
Standard practice when naming packages, in order to avoid collisions, is to name them after a domain that you own, in reverse order. So if your company's website was betterwidgets.com
, you would almost certainly put your files in a com.betterwidgets.*
package.
Java (and probably other languages) impose that the directory structure needs to conform to the package hierarchy (even though it's non-hierarchical, go figure) and so in this case, all the source files would be under "com" directory, then a "betterwidgets" subdirectory within that.