Does Java support multiple Inheritance?

Answer Posted / ujas doshi

No...Actually java does not support multiple inheritance.
You can say bcoz of reason mentioned by debapriya.

But if you want a class to be inherited from 2 classes you
can use a concept in java called interfaces..

class C extends A, extends B ---wrong, error, only one
class can be inherited

class C implements A, implements B ---fine, here A and B
are not classes but they are interfaces.

Now what are interfaces?
interfaces are similar to classes except a few things
1)Interfaces must contain static methods only

Is This Answer Correct ?    17 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you understand by synchronization? : Java thread

551


Is a method a procedure?

559


How to create an immutable class?

574


What is a dynamic array in java?

567


List two java ide’s?

619






Why collection is called framework in java?

540


Can we use a switch statement with strings?

554


How do I compare two strings in word in java?

541


What is JVM and is it platform independent?

564


What is a jit compiler?

640


What is the difference between an argument and a parameter?

544


What is the difference between method overriding and overloading?

586


What is the difference between array list and vector in java?

510


What is meant by overloading?

590


What is double in java?

520