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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.