Prof Sanket J Shah: Prepared By: Alpha College of Enginering & Technology
Prof Sanket J Shah: Prepared By: Alpha College of Enginering & Technology
PACKAGE
Prepared By:
Prof Sanket J Shah
Alpha College of Enginering & Technology
Packages
• A java package is a group of similar types of
classes, interfaces and sub-packages.
• import package.*;
• import package.classname;
• fully qualified name.
1. Using Packagename.*;
In Windows →
set CLASSPATH = C:\users\jack\java\classes
In UNIX →
% CLASSPATH = /home/jack/java/classes; export
CLASSPATH
Static Import
• The static import feature of Java 5 facilitate the
java programmer to access any static member of
a class directly. There is no need to qualify it by
the class name.