The members of a package are classes, interfaces, and subpackages. Packages are divided into compilation units. Compilation units contain type declarations and can import types from other packages to give them short names. Packages have names in a hierarchical name space, and the Internet domain name system can usually be used to form unique package names. Chapter 8 describes classes.
Class variables exist once per class.
Class methods operate without reference to a specific object. Instance variables are dynamically created in objects that are instances of classes. Classes support single implementation inheritance, in which the implementation of each class is derived from that of a single superclass, and ultimately from the class Object . Variables of a class type can reference an instance of that class or of any subclass of that class, allowing new types to be used with existing methods, polymorphically. Classes support concurrent programming with synchronized methods.