views:

56

answers:

2

Consider the following, only program body, syntax not correct:

class super
{
  func1();//the method which is to be be overridden
}
class sub1 extends super
{
  func1();
}
class sub2 extends sub1
{
  func1();
}

class Main
{
  main()
}
+1  A: 
  1. This is very possible and common use on inheritance. However, for this to work well, some languages require additional keywords (new or virtual, depending on your intentions)
  2. This does not constitute multiple inheritance. multiple inheritance is when one class is deriving many base classes.
Kobi
+1  A: 

Multiple Inheritance is the scenario when one class inherits from multiple classes. Wiki

Example: class D derives from both class B1 and class B2

class D : public B1, public B2 {
};

Your example, as itowlson already pointed out, is two levels of single inheritance, which is not same multiple inheritance.

ArunSaha