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
Why we use multi threading instead of multiprocessing?
What are the data types supported by java?
Which is a valid identifier?
Can you have two constructors in java?
What do you understand by java?
What is floor math?
Why do we use variables?
How does queue work in java?
If two threads have same priority which thread will be executed first ?
Is java a virus?
What is the difference between a window and a frame in java programming?
What is substring in java?
What is thread count in java?
What are default methods ?
Is java call by reference?