what do you mean by Inheritance? Give
different types of Inheritance?
Answers
Answer
Inheritance is a mechanism of acquiring the features and behaviors of a class by another class. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. Inheritance implements the relationship.
For example, mammal animal, dog mammal; Hence dog, animal as well.
Different Types of Inheritance
Single inheritance
Multi-level inheritance
Multiple inheritance
Multipath inheritance
Hierarchical Inheritance
Hybrid Inheritance
Inheritance is a mechanism of acquiring the features and behaviors of a class by another class. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. Inheritance implements the IS-A relationship.