Tuesday 17 January 2017

Methods in Object Class

Methods in Object Class
  · protected Object clone() throws CloneNotSupportedException
      Creates and returns a copy of this object.
  ·public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
  · protected void finalize() throws Throwable
      Called by the garbage collector on an object when garbage collection determines that there are no more references to the object
  · public final Class getClass()
      Returns the runtime class of an object.
 ·public int hashCode()
      Returns a hash code value for the object.
  ·public String toString()
      Returns a string representation of the object.
 · public final void· notify()
 · public final void· notifyAll()
 · public final void· wait()

No comments:

Post a Comment