Shared Tutorials
Tutorials Shared by the Internet Community
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Basic 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: 2486
Total Votes: 25 votes
Average Rating: 2.44 out of 5
Category: JAVA/Core JAVA
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.Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 20% |
5 |
![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() ![]() |
![]() ![]() 16% |
4 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 16% |
4 |




20%

16%

16%

16%

16%