Skip to main content

Inheritance in JAVA

Body

Inheritance in JAVA



In this tutorial you will learn
1) What is inheritance in JAVA?
2) How Inheritance is useful?
3) What is super class and subclass?
4) Function Overriding
5) How we implement inheritance in JAVA?

What is inheritance in JAVA

Inheritance is such a mechanism in JAVA by which the methods and data members of one class are inherited form to another class. It must be kept in mind that inheritance is between the two classes which have a lot of features in common. Inheritance is ‘is a’ relationship between two classes. It helps us save code space and the structure

Add new comment

Screenshot