Why does java does not support multiple inheritance? Explain



Why does java does not support multiple inheritance? Explain..

Answer / Swati Chaudhary

Java does not support multiple inheritance of classes to avoid the 'Diamond Problem' and other complications such as ambiguity in method resolution, cyclic dependencies, and problems with constructors. To achieve similar functionality, Java uses interfaces for multiple interface inheritance and composition for implementing multiple class inheritance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How many bits is a double?

1 Answers  


In Java list the methods that can be overridden?

1 Answers   Accenture,


What is jar?

1 Answers  


How do you identify independent and dependent variables?

1 Answers  


What is javac_g?

1 Answers  


What is assembly language?

1 Answers  


Where and how can you use a private constructor?

1 Answers  


There are 2 methods in a class. Both have the same method signature except for return types. Is this overloading or overriding or what is it?

9 Answers   KPIT,


Can we make the abstract methods static in java?

1 Answers  


What is the final keyword?

1 Answers  


what is bytecode? watz the difference between machine code and bytecode?

9 Answers   Oracle,


Why is it called a string?

1 Answers  


Categories