6.30 Inheritance: Packages: Interfaces
6.17 Key Points
1. Inheritance is a facility provided to create a new class from existing classes. Existing classes
are called super classes and new classes are called subclasses.
2. The access specifiers allowed for members are public, private, protected, private protected
and default access that is public up to package level.
3. If we declare the members as private, then they are only visible inside a class. They are not
visible to subclasses and outside the class.
4. Protected is an access specifier that allows subclass to derive members by subclass. Pro-
tected is visible to own class and subclass and private to others.
5. Private Protected means that it is visible to any subclass independent of the ...