CHAPTER 16
INHERITANCE REVISITED
We have studied the basic concepts in inheritance in Chapter 12. Now, let us study a few advanced concepts.
Java is a highly object-oriented language. It is most suitable for studying object orientation. Java has class Object
as the base (super) class for every other class. Hence, it is a good idea to study this class before we study advanced concepts in inheritance.
16.1 Class Object
In Java, a public class Object
is at the root of the class hierarchy. Every class in Java whether defined by us or supplied by various packages has this class as a superclass. The methods of this class are implemented by all classes including arrays.
Table 16.1 illustrates various methods from this class.
Table 16.1 Method Summary: ...
Get Programming with Java 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.