Java Reference
In-Depth Information
Interfaces and
Inner Classes
13
13.1 INTERFACES
713
Interfaces 713
Abstract Classes Implementing Interfaces 715
Derived Interfaces 715
The
Comparable
Interface 719
Example: Using the
Comparable
Interface 720
Defined Constants in Interfaces 725
The
Serializable
Interface
13.3 MORE ABOUT INNER CLASSES
740
Static Inner Classes 740
Public Inner Classes 741
Nesting Inner Classes 745
Inner Classes and Inheritance 745
Anonymous Classes 746
★
729
The
Cloneable
Interface 729
13.2 SIMPLE USES OF INNER CLASSES
734
Helping Classes 734
Example: A Bank Account Class 735
The
.class
File for an Inner Class 739
Chapter Summary 749
Answers to Self-Test Exercises 749
Programming Projects 754