Multilevel Inheritance in Java
"Cow Class" calling methods that are available inside classes "Herbivore & Animal". Though "Cow" extends only class "Herbivore", it would in turn inherit the properties of "Animal" extended by "Herbivore" .
Multilevel Inheritance in Java"Cow Class" calling methods that are available inside classes "Herbivore & Animal". Though "Cow" extends only class "Herbivore", it would in turn inherit the properties of "Animal" extended by "Herbivore" .
0 Comments
InheritanceBase classes(child class) can inherit attributes and behavior from pre-existing classes (superclasses, parent classes) Single level inheritance |