why java does not support multiple inheritance
Answer Posted / mythili pulluru
Java does not support a multiple inheritance because of following reason. for example class A
{
}
class B ExtendsA
{
//variables and methods
}
class c ExtendsA
{
//variables and methods
}
class B ExtendsA
{
//variables and methods
}
class D Extends B,C
{
//variables and methods
}
to compile this program it will give a compile time error because of class D felt in a confusion between B,C which class member to be a inherited(two class having same members) .to avoid this confusion java does not support multiple inheritance.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Define reflection.
Describe the term diamond problem.
What is not object oriented programming?
what are the methods in object?
What is the use of set in java?
What are some examples of variable costs?
Difference between arraylist and hashset in java?
What is a method signature java?
Give me an example of array and linked list? Where they can be used?
Explain about version control?
What are three ways in which a thread can enter the waiting state in java programming?
What is an example of a keyword?
What is the difference between equals() and == in java?
Can we convert stringbuilder to string in java?
What is size () in java?