N2N Global Interview Question: Q: Why multiple inheritances ... | Glassdoor

Interview Question

Senior Java Developer Interview Longwood, FL

Q: Why multiple inheritances are not supported in Java?

Answer

Interview Answer

1 Answer

0

Because of diamond pattern, diamond pattern creates ambiguity and make problem for compiler. Anyway java supports multiple inheritances via interfaces. I think more convincing reason for not supporting multiple inheritance is complexity involved in constructor chaining, casting etc rather than diamond.

Interview Candidate on Mar 6, 2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.