Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Which class is superclass of every class in java?

user-image
Question added by himanshu mittal
Date Posted: 2013/07/05
Nayeem Gani
by Nayeem Gani , Software Engineer , Nubes Systems Pvt Ltd

Object class

Sankarakrishnan P
by Sankarakrishnan P , Software Engineer , Sundaram Infotech Solutions

Object class is the super class because each and every class inherits object class (java.lang.object)

Zaid Rabab'a
by Zaid Rabab'a , Technical Team Lead , ESKADENIA Software

Object class

Ahmed Mustafa
by Ahmed Mustafa , .NET Technical Lead , Money Fellows

object class is the superclass for all other java classses

Lylia KISSOUM
by Lylia KISSOUM , Engineer .Net design and development , XPERTEAM

Object class

Aditi Andurkar
by Aditi Andurkar , Application Engineer , Tata Technologies Ltd.

java.lang.Object class is superclass of every class in java.
Following are member functions of Object class which are inherited by any class created in java.1.
clone()2.
equals()3.
finalize()4.
getClass()5.
hashCode()6.
notify()7.
notifyAll()8.
toString()9.
wait()

Siddhartha Siddu
by Siddhartha Siddu , Software Engineer , CANOY SOFT SOLUTIONS PVT.LTD

obj class

Ahtesham Khan
by Ahtesham Khan , Senior Consultant , Procons-4IT

Object class

Mohammed Kamal Abdelrahman Hussein
by Mohammed Kamal Abdelrahman Hussein , Lead Senior Software Engineer , Natwest Bank

The Object class, which sits at the top of the class hierarchy tree in the Java development environment. Every class in the Java system is a descendent (direct or indirect) of the Object class. The Object class defines the basic state and behavior that all objects must have, such as the ability to compare oneself to another object, to convert to a string, to wait on a condition variable, to notify other objects that a condition variable has changed, and to return the object's class.

Well tht is obvious The java.lang.Object is super class to all Java classes. Cuz it is one of the compiler contracts ,when a developer developes a java class and compile it ,the compiler keps a extracode right next to the class name...

 

For Example:

class A

{

}

if you compile it the "A.class" file will be generated as---

 

class A extends java.lang.Object

{

}

More Questions Like This