Why do we use hierarchical inheritance?

In Hierarchical Inheritance, the multiple child classes inherit the single class or the single class is inherited by multiple child class. The use of inheritance in Java is for the reusability of code and for the dynamic polymorphism (method overriding).

Sizin İçin Seçtik  What is hierarchical inheritance in Java example?

Leave a Reply

Your email address will not be published. Required fields are marked *