gtm.r
gtm.r

Reputation: 111

Does Object class also extends some other class?

Every Class in java extends Object class. Does Object class also extends some other class?

Upvotes: 2

Views: 57

Answers (2)

Anderson Vieira
Anderson Vieira

Reputation: 9049

Does Object class also extends some other class?

No. It is the first class in the hierarchy.

Quoting from the documentation:

Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

Upvotes: 1

Thorx99
Thorx99

Reputation: 38

no it is the first defined object in the hierarchy, you can see the hierarchy on the Object.java api. http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html

Upvotes: 0

Related Questions