Why multiple inheritances are not supported in Java
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Detail
Why multiple inheritances are not supported in Java
Some times if you give this reason to interviewer he asks if C++ can support multiple inheritance than why not Java. hmmmmm in that case I would try thttp://javarevisited.blogspot.com/2011/07/why-multiple-inheritances-are-not.html
Total Hits: 2252
Total Votes: 25 votes
Category: JAVA/Core JAVA
Submitted on: 2011-08-10 14:56:25
Submitted By: Javin Paul
Description:
more convincing reason to me is that multiple inheritances does complicate the design and creates problem during casting, constructor chaining etc and given that there are not many scenario on which you need multiple inheritance its wise decision to omit it for the sake of simplicity. Also java avoids this ambiguity by supporting single inheritance with interfaces. Since interface only have method declaration and doesn't provide any implementation there will only be just one implementation of specific method hence there would not be any ambiguity. More detail...Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 20% |
5 |
![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 16% |
4 |





20%

16%

16%

16%

16%