![]() |
syntactic unit > scoping unit > package |
![]() ![]() | ||||
package | ||||
subject | fact |
package | can be imported | ![]() |
can be imported by using the import statement ![]() | ![]() | |
contains 0 or more classes and 0 or more interfaces | ![]() | |
defines a name space ![]() | ![]() | |
has definition A collection of related classes and interfaces that provides access protection and namespace management | ![]() | |
groups classes or interfaces by function | ![]() | |
has a name | ![]() | |
has purpose
| ![]() | |
has purpose to group together related classes into a subsystem ![]() | ![]() | |
is a subtopic of Packages | ![]() | |
is specified by a file that begins with a package statement | ![]() | |
is stored as a set of class files in a directory | ![]() | |
is a kind of scoping unit | ![]() | |
see also package name | ![]() | |
to create you put a class in it or put an interface in it by putting a package statement at the top of the source file in which the class or interface is defined | ![]() | |
to import you use the import statement with the asterisk wildcard character | ![]() | |
syntactic unit | has syntax rule bold = mandatory | ![]() |
Kinds of package :
Next scoping unit: block Up: scoping unit