Name the methods of an object class

  • clone(): This method helps create and return a copy of an object.
  • equals(): This method helps compare.
  • finalize(): It is called by the garbage collector on the object.
  • getClass(): It allows us to return the runtime class of the object.
  • hashCode(): This method helps return a hash code value for the object.
  • toString(): It lets us return a string representation of the object.
  • notify(), notifyAll(), and wait(): These help in synchronizing the activities of the independently running threads in a program.