Projects/Package Naming Convention?

sharaidana picture sharaidana · Aug 2, 2011 · Viewed 37.1k times · Source

I just know only naming convention of variable, constant, method... but I don't know naming convention of project and package. Anybody can help me ? Addition, name of project should have white space ? Thanks very much !

Answer

Robert Harvey picture Robert Harvey · Aug 2, 2011

In Java, package names are lowercase, no spaces. See http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

You probably don't have to be so fussy with the project names. My recommendation is PascalCase, although I've seen some like this one that are camelCase (which I find odd). Sun just uses capitalized phrases for their project names.