First page Back Continue Last page Graphics
Java Packages
Classes that are in the same directory should be grouped into a package. Why?
- To allow classes in a different directory to conveniently import them, and
- To avoid name clashes
For example, the test and MyInt classes could be grouped into a package called foo
- If so, a directory called foo should contain the files test.java and MyInt.java