O'Reilly logo

The class of Java by Pravin Jain

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 8

The Object Class

In Chapter 7, we have seen that there is single inheritance of classes in Java, i.e. a class cannot have more than one direct super-class. Every class in Java has a direct super-class, if we do not declare a super-class while defining a class then the compiler assumes the Object class to be the super-class. Only the Object class does not have any super-class. In Java any instance which is created has certain minimum behaviour. When an instance of any reference type is created, it has certain methods always available. These are the methods which are inherited from the Object class. These methods are also available on instances of arrays. Object class is the root of the class hierarchy, defining the minimum set of methods ...

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