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 does not support multiple inheritance

Answer Posted / mahesh patil

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

Suppose a programmer ABC inherited the class Z to class X
and overrided the aaa().So this class will have the new
implementation of aaa().
Suppose a programmer DEF inherited the class Z to class Y
and overrided the aaa().So this class will have the new
implementation of aaa().

If Multiple Inheritance is permitted in java, then if the
new programmer inherited both the classes and he didn't done
any overriding of method aaa() then if he calls the aaa()
,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 ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is identifier give example?

983


How many unicode characters are there?

989


What are 3 boolean operators?

949


Define max and min heap, also the search time of heap.

992


what are the methods in object?

1099


What are constants and how to create constants in java?

945


Can a lock be acquired on a class in java programming?

928


How do generics work?

900


How many types of interfaces are there?

991


How to remove the trailing spaces from a string?

1189


Explain about anonymous inner classes ?

1023


What are the important features of Java 9 release?

955


What is meant by string is immutable?

1011


Why do we use variables?

934


What is jvm? How its run?

1030