J2EEOnline
GofPatterns OOPortal
prev next prev next
  Course navigation
 
Lesson 2
Objective
Understanding packages
Examine packages and the role they play in Java class organization.
   
To aid in the organization of classes, Java provides a construct known as a package that is used to organize classes into functionally-related groups. Packages do not directly impact the internal makeup of a class but they do impact the relationship between classes.
  1. All of the classes in the Java API are organized into a group of packages.
  2. The standard java.lang package is the only package that is automatically imported into every Java program.
  3. Packages help you uniquely identify classes. The package to which a class belongs is implicitly part of the class name.
    So the standard Java class Graphic is really named java.awt.Graphics. This identification helps to provide structure to all Java classes.
  Course navigation