The Object class -


Java defined a special class known as Object. All the classes either predefined or users defined are subclasses of Object class. That is Object class is parent class of all classes.
Object class contains the following methods -
Ll
Method (with return type) Purpose
protected Object clone( ) Creates a new object that is the same as the object being cloned.
public boolean equals(Object object) Determines whether one object is equal to another.
protected void finalize( ) Called before an unused object is recycled.
public final Class getClass( ) Obtains the class of an object at run time.
public int hashCode( ) Returns the hash code associated with the invoking object.
public final void notify( ) Resumes execution of a thread waiting on the invoking object.
public final void notifyAll( ) Resumes execution of all threads waiting on the invoking object.
public String toString( ) Returns a string that describes the object.
public final void wait( )
public final void wait(long milliseconds)
public final void wait(long milliseconds,int nanoseconds)
Waits on another thread of execution.
Note -
1- clone() and finalize() methods are protected and all the others are public methods.
2- wait(), notify(), notifyAll() and getClass() are final methods, so we cannot override these methods.