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

What is dynamic array in java?

745


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

814


What is visibility mode?

732


Explain enumeration in java?

777


Why strings in java are called as immutable?

774


Explain scope or life time of local variables in java?

782


What is the difference between an inner class and a sub-class?

721


What is bigger kb or mb?

792


How to make a non daemon thread as daemon?

797


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

4391


Which are different kinds of source code?

883


What are the data types supported by java?

743


What is the symbol for line break?

853


What are the different tags provided in jstl?

757


What class of exceptions are generated by the java run-time system?

893