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

Explain different types of wrapper classes in java?

1028


Why strings in java are called as immutable?

993


Which category the java thread do fall in?

1006


What are keywords and reserved words in java?

1063


What is array size in java?

965


What do you understand by access specifiers in Java?

1015


Can we change the scope of the overridden method in the subclass?

1390


Which types of exceptions are caught at compile time?

1037


Why array is used in java?

975


How can we create a thread in java?

1028


What is the difference between preemptive scheduling and time slicing?

1068


What does jre stand for?

1064


Where and how can you use a private constructor?

998


What is the purpose of interface?

1007


What is JDBC Driver interface?How can you retrieve data from the ResultSet

2109