Chapter 5. Inheritance
In this chapter
• 5.1 Classes, Superclasses, and Subclasses
• 5.2 Object
: The Cosmic Superclass
• 5.4 Object Wrappers and Autoboxing
Chapter 4 introduced you to classes and objects. In this chapter, you will learn about inheritance, another fundamental concept of object-oriented programming. The idea behind inheritance is that you can create new classes that are built on existing classes. When you inherit from an existing class, you reuse (or inherit) its methods, and you can add new methods and fields to adapt your new class to new situations. This technique is essential ...
Get Core Java® Volume I—Fundamentals, 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.