1 |
A package is a collection of classes.
|
2 |
Java directly associates the names of classes and packages with the directory (folder) structure:
-
A package must in be a directory or folder of that name
-
A public class must be in a file of that name. Note that a file may contain other (non-public) classes.
|
3 |
Packages of classes may be defined by users as well as forming the structure of the remaining Java libraries.
|
4 |
What we have seen so far is all there is to the base language Java (with the exception of Exceptions!). All of the rest of Java functionality comes as classes defined in packages that come with the language.
|