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
Is array passed by reference in java?
Why java strings are immutable in nature?
What is the difference between and ?
How do I know if java is installed?
What does a boolean method return?
Can we initialize the final blank variable?
What is a variable analysis?
What is return type in java?
Is java still relevant?
Which non-unicode letter characters may be used as the first character of an identifier?
What do you mean by access modifier?
Explain the difference between call by refrence and call by value?
Differentiate between class and structure.
Explain about anonymous inner classes in java?
What is an immutable class? How to create an immutable class?