Suppose I have two classes: Animal and Dog. Dog is a subclass of Animal. I do the following code:
Animal a = new Dog();
Now I can call methods
inheritance is the dynamic polymorphism. I mean when you remove inheritance you can not override anymore.