Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why java not supproting multiple inheritance?

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


Please Help Members By Posting Answers For Below Questions

What is object class in java?

912


Is there any tag in htm to upload and download files?

1040


How can we make string upper case or lower case?

1067


Explain about narrowing conversion in java?

999


What is __ init __ functions?

1112


What is the purpose of java?

999


What is difference between public static and void?

1007


What is numeric data type?

978


What is the difference between Java and C++?

1177


Differentiate between static and non-static methods in java.

1036


Can we access instance variables within static methods ?

1082


What is difference between add() and addelement() in vector?

1519


What is the size of an array?

1028


What is the type of lambda expression?

1015


How to create a base64 decoder in java8?

1050