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 are data structures in java?
Why convert an applet to an application?
What is a treeset class?
What is a parameter in java?
What does it mean that a method or field is “static”?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
What are keywords in programming?
What are encapsulation, inheritance and polymorphism?
What does 0 mean in boolean?
List out five keywords related to exception handling ?
What does you mean in math?
Where are the card layouts used?
What is a java predicate?
What is a default constraint?
What is the current version of java?