Default Methods


Idioms and Techniques

Design Rationale

Advanced Questions

What about the diamond problem?

The “diamond problem” is an ambiguity that can arise as a consequence of allowing multiple inheritance. It is a serious problem for languages (like C++) that allow for multiple inheritance of state. In Java, however, multiple inheritance is not allowed for classes, only for interfaces, and these do not contain state.

Consider the following situation: