Object Class in Java

Object class is super class of all classes in Java. Every class in Java extends Object class directly or in-directly. There are total 12 methods in Object class. You can call override all non-final, public and protected methods. You can also call all public methods on object of any class(custom or in-built).
  1. toString
  2. clone
  3. equals
  4. hashCode
  5. notify and notifyAll
  6. wait
  7. finalize
  8. registerNatives
  9. getClass

Comments

Popular posts from this blog

Data types and Literals in Java

How to define Auxiliary Constructor in case class in Scala

equals() method of Object class in Java