What is inheritance and explain its types in Java?

Inheritance in Java is a mechanism in which one object acquires all the properties and behaviors of a parent object . It is an important part of OOPs (Object Oriented programming system). The idea behind inheritance in Java is that you can create new classes that are built upon existing classes.

Leave a Reply

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