Object is the root of a hierarchy of classes. The subclass inherits state and behavior in the form of variables and methods from its superclass . The subclass can just use the items inherited from its superclass as is, or the subclass can modify or override it.