What is an Inheritance?
Inheritance: It is the object oriented programming (OOP)concept in which property of one class acquire by the another class.
- Single inheritance
- Multilevel inheritance
- Hierarchical inheritance
- Hybrid inheritance
Single Inheritance: In this one child class is derived from one parent or base class.
There is a code written in java with an example of different type of inheritance.
Output after the execution
Tags:
PROGRAMMING
Good
ReplyDelete