Multiple Inheritance
Definition
If a class is derived from "Two or more classes", it can be called as multiple inheritance. (OR) In this inheritance their exist multiple base classes and one single derived class. The below example shows the multiple inheritance.
Example
➤ In Java programming never support multiple inheritance to the concept of classes because it contain ambiguity problems.
➤ Multiple inheritance does support in java by the concept of interfaces.
Hybrid Inheritance
Definition
hybrid inheritance is equal to the combination of any type of inheritance type. In this combination one of the combination is multilevel inheritance and multiple inheritance is called as hybrid inheritance which is shown below image.
Example:1
➤ In Java programming never support hybrid inheritance to the concept of classes because it contain ambiguity problems.
➤ Hybrid inheritance does support only in java by the concept of interfaces.
No comments:
Post a Comment
Thanks for visiting my site..