O'Reilly logo

Programming with Java by Sunil Patekar, Mahesh Bhave

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 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: ...

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