أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Multiple inheritance causes problems, if one or more of the parent classes defines members with same identifier. You would have to decide which parent to use to handle each method call, and the operation of class can be then very different than intended.And usually, there is no situations when multiple inheritance is needed. "Good" classes usually maps to some phenomenom or object, and very few things are at the same time based on two different things. Usually when people wish to do multiple inheritance (is-a), a "has-a" relation is needed, meaning that a class contains some objects.Multiple inheritance is also highly discouraged in languages where it is supported (C++ etc.). Multiple inheritance is confusing at best.
To avoid confusion when having attributes or methods whith the same name.
You can always use multiple inheritance with interfaces.