Answer Posted / aman kr. aggarwal
well as in c++ we have multiple inheritance, but not in java
becz if it is their then having method of same signature
(means same return type, list of paraments, access
specifiers) in 2 different classes and both r extended by
some class AA then while calling method in base class, it
would break down the jvm that to which classes method to be
called.
EX:-
class BB
{
public void a(int x)
{
System.out.println("call from BB");
}
}
class CC
{
public void a(int x)
{
System.out.println("call fro CC");
}
}
class AA extends BB,CC
{
a(5);
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is object class in java?
Is there any tag in htm to upload and download files?
How can we make string upper case or lower case?
Explain about narrowing conversion in java?
What is __ init __ functions?
What is the purpose of java?
What is difference between public static and void?
What is numeric data type?
What is the difference between Java and C++?
Differentiate between static and non-static methods in java.
Can we access instance variables within static methods ?
What is difference between add() and addelement() in vector?
What is the size of an array?
What is the type of lambda expression?
How to create a base64 decoder in java8?