Section 9.1 Introduction

• Inheritance (p. 361) reduces program-development time.

• The direct superclass (p. 361) of a subclass is the one from which the subclass inherits. An indirect superclass (p. 361) of a subclass is two or more levels up the class hierarchy from that subclass.

• In single inheritance (p. 361), a class is derived from one superclass. In multiple inheritance, a class is derived from more than one direct superclass. Java does not support multiple inheritance.

• A subclass is more specific than its superclass and represents a smaller group of objects (p. 361).

• Every object of a subclass is also an object of that class’s superclass. However, a superclass object is not an object of its class’s subclasses.

• An is-a relationship ...

Get Java™ How To Program (Early Objects), Tenth Edition 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.