All About Class Object in Java

The Object class is the root of all classes available in Java. So it is the parent in the hierarchy. Every class has Object as a super class(parent).All objects implements methods of this class. The structure of original Object class is as follows:


public Class java.lang.Object{
//Conctructor
public Object();
// creates a new instance of the Class Object and allocates memory for it.
/Methods:
protected Object clone();
protected void finalize();
public boolean equals(Object obj);
public final Class getClass();
public int hasCode();
public final void notify();
public final void notifyAll();
public String toString();
public final void wait();
public final void wait(long timeOut);
public final void wait(long timeOut,int nanos);

}
 
All About Class Object in Java All About Class Object in Java Reviewed by Animesh Chatterjee on September 06, 2018 Rating: 5

No comments:

Powered by Blogger.