February 2013
Intermediate to advanced
672 pages
16h 2m
English
A package declaration appears within a compilation unit to indicate the package to which the compilation unit belongs.
A package declaration in a compilation unit specifies the name (§6.2) of the package to which the compilation unit belongs.
PackageDeclaration: Annotationsopt package PackageName ;
The package name mentioned in a package declaration must be the fully qualified name (§6.7) of the package.
The PackageName in a package declaration ensures there is an observable package with the supplied canonical name, and that it is not subject to the rules in §6.5.3 for determining the meaning of a package name.
The scope and shadowing of a package declaration is specified in §6.3 and §6.4.
Read now
Unlock full access