Package Declaration
The package declaration at the top of the source file declares that the Elevator Frame class belongs to the package named elevator.
When the package declaration is absent from a file, all the classes contained in the file belong to unnamed package.
A class in a named package can be referred in two ways.
Using Packages
elevator.ElevatorPlanel
Benefits
Figure
Importing a class in the package
Import packagename.ClassName;
Import packagename.*;
Import elevator.ElevatorPanel;
Import elevator.*;
Accessing Class in a package
Creating your Package
Packages – Directory Paths
Compile Package Classes
c:\project> javac -d . elevator\*.java
��������Notes on the import statement�