What is inheritance and its types with example?

The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class . Inheritance implements the IS-A relationship. For example, mammal IS-A animal, dog IS-A mammal; Hence dog IS-A animal as well.

Sizin İçin Seçtik  Is multilevel inheritance possible in Java?

Leave a Reply

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