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 does java doesnot support multiple inheritance?

Answer Posted / rana.ankur

Suppose consider a method funX() which is in class Z.

Suppose a programmer A inherited the class Z to class X and
overrided the funX().So this class will have the new
implementation of funX(). ie class X extend Z
Suppose a programmer D inherited the class Z to class Y and
overrided the funX().So this class will have the new
implementation of funX(). ie class Y extend Z


If Multiple Inheritance is permitted in java, then if the
new programmer C inherited both the classes and he didn't
done any overriding of method funX() then if he calls the
funX() ,the JVM will not know which method to call i.e.,
either the method in class X or method in class Y.

Because of this inconsistencies,Multiple inheritance is not
permitted in java

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are access specifiers in java ?

1134


what methods would you overwrite in java.lang.object class?

1002


Difference between static synchronization vs. Instance synchronization?

1111


List types of storage classes in java?

1140


What is the difference between JDK and JVM?

1261


How does regex work?

956


what are the states associated in the thread? : Java thread

1043


What is difference between identifier and variable?

1060


What is the difference between the paint() and repaint() methods in java programming?

1184


How can we avoid including a header more than once?

1031


What is nested top-level class?

1032


What is empty list in java?

1071


What is the full name of java?

1114


Can we override the static method?

1023


Explain the reason behind ending a program with a system.exit(0)?

1080