Number Of Page View:100,000+/Months
LOGIN |New User


What is diamond problem?
Suppose You are having the four classes named A, B, C, and D. Assume that class A is the superclass of class B and class C. Now in a programming language, that support multiple inheritance, class D can inherit from the two classes B and C. Suppose class A has a variable v and this variable is inherited in the classes B and C. Again v is inherited by the class D from B and C. Now class D has indirectly inherited variable v form the class A but class D contain two version of the variable b inherited from classes B and C. This is the reason that Java does not support Multiple inheritance. This problem is called diamong problem, because if we desing it graphically, it looks like a diamond shape.
Posted By: Name:Rajesh Kr URL: What is diamond problem?