Is multiple inheritance allowed in Java? Why ?

Answer Posted / midhun h kumar

No ...
Multiple inheritance is not allowed in Java...
but infact we can achieve the functionality using interfaces...
we can define interfaces and any class can implement these
interfaces..
a class can implement any number of interfaces but can
extend only one class..
thus we can achieve what we expect to get from multiple
inheritance thru interfaces...

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the generic class?

533


Which sorting algorithm is best in java?

537


What is runtime polymorphism or dynamic method dispatch?

524


Which is easier netbeans or eclipse?

612


How can we make sure main() is the last thread to finish in java program?

673






How many types of flags are there?

523


How can we pass argument to a function by reference instead of pass by value?

588


What is a singleton class in Java?

506


Can we sort set in java?

542


What is the difference between method overriding and overloading?

582


What is the technique adopted to create an immutable class?

526


What about features of local inner class?

621


Is an empty arraylist null?

598


What is array length?

507


How many static init can you have?

684