Chapter 4 ▪ Inheritance and Reflection
The preceding chapters introduced you to classes and interfaces. In this chapter, you will learn about another fundamental concept of object-oriented programming: inheritance. Inheritance is the process of creating 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.
Instance variables and static variables are collectively called fields. The fields, methods, and nested classes/interfaces inside a class are collectively called its members.
This chapter also covers reflection, the ability to find out more about classes and their members in a running program. Reflection is a powerful feature, ...
Get Core Java for the Impatient, 4th 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.