Mam Kathy Sierra says that reverse Inheritance doesn't exists, at the same time when we do
polymorphism , the reverse inheritance comes into scene.
E.G.
class Animal {
// some instance variables
// some methods
}
class Dog extends Animal {
// some instance variables specific to Dog class
void make_noise(){
} //some methods specific to Dog class
}
class Tester {
Animal animal = new Dog();
animal.makenoise();
}
My doubt is that, if reverse inheritance is not possible, then how the above code is valid ???
I shall be very pleased if someone could make me understand this !!