0 votes
in JAVA by
Why java does not support multiple inheritance?

1 Answer

0 votes
by

Why java does not support multiple inheritance?

1) Java supports multiple inheritance through interfaces only. A class can implement any number of interfaces but can extend only one class.

2) Multiple inheritance is not supported because it leads to a deadly diamond problem. However, it can be solved but it leads to a complex system so multiple inheritance has been dropped by Java founders.

🔗Reference: stackoverflow.com

🔗Source: Java Interview Questions and Answers

Related questions

+1 vote
asked Dec 7, 2020 in JAVA by SakshiSharma
0 votes
asked Feb 9, 2021 in JAVA by SakshiSharma
...