Java package: Difference between revisions

Content deleted Content added
Using packages: Added section on the `package-info.java` file.
irrelevant
Line 2:
providing a unique namespace for each type it contains.
Classes in the same package can access each other's package-private and protected members.
Java packages can be stored in compressed files called [[JAR file]]s, allowing classes to be downloaded faster as groups rather than individually.
 
In general, a package can contain the following kinds of [[Datatypes|types]]: classes, interfaces, enumerations, and annotation types. A package allows a developer to group classes (and interfaces) together. These classes will all be related in some way – they might all have to do with a specific application or perform a specific set of tasks.