why java not supproting multiple inheritance?

Answer Posted / tulasi prasad

java does not support multiple inheritance directly because


if we r deriving a sub class from 2 super classes which are
as follows

class A
{
void meth()
{
// substraction;
}
}

class B
{
void meth()
{
// Addition;
}
}

class C extends A,B
{
meth()<--- system get into confusion whether its add
or substarct.
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between collection api and stream api in java8?

617


What does index mean in java?

627


What is pojo class in java?

629


What are wrapper classes in java?

696


Explain what pure virtual function is?

686






What does the three dot emoji mean?

679


What is args length in java?

777


What is the applet security manager, and what does it provide?

644


What is the public method modifier?

636


What are memory tables?

688


What is Java Shutdown Hook?

721


What is thread safe singleton?

615


What is an empty class? What functionality does it offer in Java?

808


What does the exclamation mark mean in java?

766


How to restrict a member of a class from inheriting by its sub classes?

937