Java package

A Java package organizes Java classes into namespaces,[1] providing a unique namespace for each type it contains. Classes in the same package can access each other's package-private and protected members.

In general, a package can contain the following kinds of 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. Programmers also typically use packages to organize classes belonging to the same category or providing similar functionality.

  1. ^ James Gosling, Bill Joy, Guy Steele, Gilad Bracha, The Java Language Specification, Third Edition, ISBN 0-321-24678-0, 2005. In the Introduction, it is stated "Chapter 7 describes the structure of a program, which is organized into packages similar to the modules of Modula."

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search