Social Icons

Tuesday, 11 February 2014

What are the different categories of inheritance?

Answer:-
   Single inheritance :- Contains one base class and one derived class.

    Hierarchical inheritance :- Contains one base class and multiple derived classes of the same base  class.

    Multilevel inheritance :- Contains a class derived from a derived class.

    Multiple inheritance :- Contains several base classes and a derived class.

    Hybrid inheritance :- is nothing but a any combination of single,multiple and Hierarchical inheritance. Multiple inheritance class is not possible as it give assembly level error when we use the same name for method.Multiple inheritance in interface is possible.








No comments:

Post a Comment