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
What are accessor methods in java?
Is assembly language a low level language?
What does mean in regex?
What is null statement?
What is a constructor overloading in java?
How does multithreading take place on a computer with a single cpu?
What is purpose of find feature?
Describe what a thread-local variable is in java?
Can a method inside a interface be declared as final?
What will be the initial value of an object reference which is defined as an instance variable?
What is <> used for in java?
What are internal variables?
Difference between final and effectively final ? Why is effectively final even required ?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
What is initial size of arraylist in java?