Sunday, 10 May 2009

Java Packages

To create a package, put a package statement at the top of each source file containing the package types. This statement must be the first line in each source file.

Without the package statement, types end up in unnamed packages. This is acceptable only for small or temporary applications when you are just beginning the development process.

Package names tend to:
1. be written in lowercase
2. use reversed internet domain convention

No comments: