Inheritance
.png)
Inheritance What is the meaning of Inheritance ? Simply,inheritance is owning or belonging something/s from one person/generation to another person/generation.It may be anything. What is Inheritance in JAVA ? Taking the things/properties in one JAVA class to another JAVA class is called as Inheritance . What are two categories of Inheritance Concept ? sub class (child) - the class that inherits from the initial class. super class (parent) - the class that is used to inherit other classes. How do we inherit one class from another class ? First of all we should create a relationship between 2 classes. For that,we use the keyword extends . If we consider the process of manufacturing a new car as an example, that car may contain newest features and it will include the features of its previous version. So, the oldest version can be identified as the super class and the modern version will be the sub class. The older version has a colour,name,lights,..etc.Actually they're...