Professional Documents
Culture Documents
Inheritance
Inheritance
The process by which one class acquires the data members, methods of other
class is known as Inheritance.
The class which inherit other class is known as child class and the class which
is inherited by other class is known Parent Class.
extends Keyword is used to inherit other.
Inheritance helps us to reuse the code which is already done but present in
other class. So that we can only write the unique code.
One Class cannot extends two classes simultaneously.
Single Inheritance:
Multilevel Inheritance:
Hierarchical Inheritance:
Hybrid Inheritance:
When Combination of more than one inheritance in signal program then it’s
called Hybrid Inheritance.
Means two or more type of inheritance used in same program then its called
Hybrid Inheritance.