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 is the difference between the final method and abstract method?
when to use ArrayList and when to use HashMap in webApplication.
What is toarray method in java?
What is object of class in java?
what is the messsage u r going to get from an objectoriented programing?
What is the use of arraylist class in java?
How do you sort objects in java?
What is the difference between a field variable and a local variable?
How to invoke external process in java.
How to remove the trailing spaces from a string?
What is the difference between variable declaration and variable initialization?
What is void in java?
Can It is possible to synchronize the constructor of a Java Class?
Where is the singleton class used?
How do you check if a number is a perfect square?