Inheritance:
Inheritance is one of the distinct facility in object oriented programming.
The concept of inheritance brought into java language for solving various problems which are generally occurring in s/w development.
Def of Inheritance:
The process of getting the data members and methods from one class to another class is known as Inheritance.
The class which is giving data members and methods to another class is known as base/ super/parent class.The class which is talking data members and methods is known as derived/sub/child class.
Example:-
Inheritance is one of the distinct facility in object oriented programming.
The concept of inheritance brought into java language for solving various problems which are generally occurring in s/w development.
Def of Inheritance:
The process of getting the data members and methods from one class to another class is known as Inheritance.
The class which is giving data members and methods to another class is known as base/ super/parent class.The class which is talking data members and methods is known as derived/sub/child class.
- Data members and methods of a class are known as Features.
- The concept of inheritance is also known as re-usability/sub classing/derivation/extendable classes.
Example:-
Def of Derived class:-
A derived class is one which contains some of the features on its own which contains some of the features on its own values.some of the features are inherited from base class.
Advantages of Inheritance:
When we develop any application with the concept of inheritance,we get the following advantages.
A derived class is one which contains some of the features on its own which contains some of the features on its own values.some of the features are inherited from base class.
Advantages of Inheritance:
When we develop any application with the concept of inheritance,we get the following advantages.
- Application development time is very less.
- Application memory space is less,so that performance of that application is improved.
- Redundancy(repetition) of the code is reduced so that work space for the methods is reduced and consistency of the application is achieved.
- Execution time of the application is less.
- Overall the performance of the project is improved.
- With inheritance concept we are achieving the slogan of Java "WORA"(Write once run anywhere).