Introduction

The designers of Java decided at an early stage that Java classes would have single inheritance—in other words, each class has only one parent class. Sometimes in object-oriented programming, you want a class to partake of the methods of more than one parent. In Java 1, this was supplied to some extent by the concept of interfaces, but in Java 1.1, the designers found it necessary to add the concept of nested classes.

Get Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.