Chapter 6. More OOP—Extending Classes

More OOP—Extending Classes

We now come to the second part of object-oriented programming where we cover another two parts of “A PIE:” inheritance and polymorphism. You need a solid understanding of these to successfully use the Java library routines. Despite the unusual names, they describe some clean concepts.

Inheritance means basing a new class on a class that is already defined to extend it in some way. Inheritance is what you acquire from past generations. Just as inheritance in real life is “what you get from a parent,” inheritance ...

Get Just Java™ 2, Fifth 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.