+ 1
Explain Inheritance with example in easy way ?
3 Answers
+ 7
In java classes can be derived from classes. Basically if you need to create a new class and here is already a class that has some of the code you require, then it is possible to derive your new class from the already existing code.
This concept allows you to reuse the fields and methods of the existing class with out having to rewrite the code in a new class. In this scenario the existing class is called the super class and the derived class is called the subclass.
+ 5
inheritance means deriving properties of on class to another. we can reuse the properties of parent class in child class.
+ 2
Inheritance is the property of oops in which one class uses the property of another class