Facebook Page Twitter Page LinkedIn Page
× Java.lang Package Classes


Java Object Class

Java.lang package provides an Object class which is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

Class declaration

The declaration of java.lang.Number class is:

public class Object

Class Constructor

S.NConstructors & Description
1. Object()

java.lang.Object Methods

The java.lang.Object class has a number of methods which are listed below:

Member Methods

S.NMethods & Description
1. protected Object clone()
Creates and returns a copy of this object.
2. boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
3. protected void finalize()
Deprecated. Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
4. Class<?> getClass()
Returns the runtime class of this Object.
5. int hashCode()
Returns a hash code value for the object.
6. String toString()
Returns a string representation of the object.

5