
72 9 Chapter 4: The Languages of Mac OS X: Java
Inheritance and Organization in Java
Packages
Organizing the parts of an object-oriented system is always a
challenge. C++ provides for organization primarily through
the use of inheritance (including multiple inheritance). Objec-
tive-C supports not only inheritance, but also the concept of
protocols--sets of methods that as a unit can be adopted by an
object.
Java addresses the issue in a somewhat similar manner to Ob-
jective-C. Any class can be a descendant of any other class. In
Java terms, a subclass extends its superclass, as in
public final class java.lang.Booleam
extends java.