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 abstract class? Explain
What are keywords and reserved words in java?
What is a java lambda expression?
What does it mean to flush a file?
What is a function easy definition?
What is bool mean?
Is a char always 1 byte?
How does a for loop work?
What methodology can be utilized to link to a database?
What are the five major types of reference sources?
What do u mean by variable?
What does java final mean?
What is byte code and why is it important to java’s use for internet programming?
What is the difference between math floor and math round?
How do you know if a value is nan?