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
what do you understand by synchronization? : Java thread
Is a method a procedure?
How to create an immutable class?
What is a dynamic array in java?
List two java ide’s?
Why collection is called framework in java?
Can we use a switch statement with strings?
How do I compare two strings in word in java?
What is JVM and is it platform independent?
What is a jit compiler?
What is the difference between an argument and a parameter?
What is the difference between method overriding and overloading?
What is the difference between array list and vector in java?
What is meant by overloading?
What is double in java?