| | InheritanceSubclasses inherit those superclass members declared as
public or protected. Subclasses inherit those superclass members declared with no
access specifier as long as the subclass is in the same package as
the superclass. Subclasses don't inherit a superclass's member if the
subclass declares a member with the same name. In the case of member
variables, the member variable in the subclass hides the one in the
superclass. In the case of methods, the method in the subclass
overrides the one in the superclass.
|