View RSS Feed

Java Object

Object-oriented programming in Java.

  1. What You Can Do in a Subclass

    by , 04-26-2012 at 06:29 PM
    Subclass inherits protected and public members of parent no matter in which package is the subclass. If subclass and parent are in same package then package-private members are also inherited. Inherited members could be used to hide them, replace them or supplement them, with newer members:

    • Just the way other fields do, inherited fields can also be directly used.
    • A field can be declared in subclass with similar name just like that present in superclass hence hiding it (which
    Tags: subclass Add / Edit Tags