O'Reilly logo

Core Java™, Volume I–Fundamentals, Eighth Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Inheritance

CLASSES, SUPERCLASSES, AND SUBCLASSES

Object: THE COSMIC SUPERCLASS

GENERIC ARRAY LISTS

OBJECT WRAPPERS AND AUTOBOXING

METHODS WITH A VARIABLE NUMBER OF PARAMETERS

ENUMERATION CLASSES

REFLECTION

DESIGN HINTS FOR INHERITANCE

Chapter 4 introduced you to classes and objects. In this chapter, you 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 fields and you add new methods and fields to adapt your new class to new situations. This technique is essential in Java programming.

As with the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required