Summary

Section 9.1 Introduction

  • Software reuse reduces program-development time.

  • The direct superclass of a subclass (specified by the keyword extends in the first line of a class declaration) is the superclass from which the subclass inherits. An indirect superclass of a subclass is two or more levels up the class hierarchy from that subclass.

  • In single inheritance, a class is derived from one direct 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.

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

Get Java™ How to Program, Seventh 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.