When one has too many files, one needs to organize them in folders (directories). Similarly, when one has too many classes (developed by him) to use, some organization or grouping is needed. Java offers it in the form of
package. We know that Java gives us many useful classes to use directly in our programs. These classes are also grouped into packages. The few common packages are
applet, awt, color, event, io,
lang, math and
swing. The complete list of JDK application programming interface (API) packages is presented in the appendix.
A package can be defined as “a collection of related classes and interfaces that provides access protection and ‘namespace management’”. ...