Does Java really support multiple inheritance or not?

John Mitchell

Yes and no. The fact is that Java separates implementation inheritance from interface inheritance. Interface inheritance deals with the "contract" which a class adheres to while implementation inheritance deals with the reuse of code and the contract which a class adheres to.

Java only allows "multiple inheritance" of interfaces. It does only allows single inheritance of implementation. This is a good bit different from e.g., C++ where both concepts are intermingled (which I think is quite ugly and needleslly complex).

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact