All the methods of Object are inherited by every class. : Object « Utility Classes « SCJP






public class MainClass {
  public static void main(String[] argv) {
    MyClass my = new MyClass();
    System.out.println(my.toString());
  }
}

class MyClass {
}








8.1.Object
8.1.1.The Object class is the ultimate ancestor of all Java classes.
8.1.2.All the methods of Object are inherited by every class.