Chapter 7 describes the structure of a Java program, which is organized into packages similar to the modules of Modula. The members of a package are compilation units and subpackages. Compilation units contain type declarations and can import types from other packages to give them short names. Packages have names in a hierarchical namespace, and the Internet domain name system can be used to form unique package names. Chapter 8 describes Java's 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.