Single Inheritance, Object Class
Java allows only single inheritance.
inherit deeper relation one and composite remains.
Object class : parent of every class
Class which has no parent inherits Object class automatically.
=> All of class inherit methods from Object class. ex) toString(), equals(Object obj), hashCode(),...
toString() : return class name and address(not exactly but meaningful)
Last updated