Section 10.4 Abstract Classes and Methods

• Abstract classes (p. 401) cannot be used to instantiate objects, because they’re incomplete.

• The primary purpose of an abstract class is to provide an appropriate superclass from which other classes can inherit and thus share a common design.

• Classes that can be used to instantiate objects are called concrete classes (p. 402). They provide implementations of every method they declare (some of the implementations can be inherited).

• Programmers often write client code that uses only abstract superclasses (p. 402) to reduce client code’s dependencies on specific subclass types.

• Abstract classes sometimes constitute several levels of a hierarchy.

• An abstract class normally contains one or more ...

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.