filmov
tv
Multi Level Inheritance in Java

Показать описание
we can build hierarchies that contains as many layers of inheritance as you like.As mentioned it is perfectly acceptable to use a sub class as a super class of another. For example given three classes called AB and C can be a subclass B which is a subclass of A when this type of situation occurs each subclass inherits all of the traits. found in all of its super classes. In this case C inherits all aspects of B and A. To see how a multilevel hierarchy can be useful, consider the following program.