Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Which class is superclass of every class in java?

user-image
Question ajoutée par himanshu mittal
Date de publication: 2013/07/05
Nayeem Gani
par Nayeem Gani , Software Engineer , Nubes Systems Pvt Ltd

Object class

Sankarakrishnan P
par 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
par Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.

Object class

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

object class is the superclass for all other java classses

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

Object class

Aditi Andurkar
par 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
par Siddhartha Siddu , Software Engineer , CANOY SOFT SOLUTIONS PVT.LTD

obj class

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

Object class

Mohammed Kamal Abdelrahman Hussein
par 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