What is hierarchical inheritance in Java example?

When two or more classes inherits a single class, it is known as hierarchical inheritance. In the example given below, Dog and Cat classes inherits the Animal class , so there is hierarchical inheritance.

Sizin İçin Seçtik  What is class hierarchy example?

Leave a Reply

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