What is hierarchical inheritance in Java with 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  Scalp ne demek kripto?

Leave a Reply

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