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

Explain the JDB in depth & command line.

959


What is the difference between Java and C++?

1124


How to sort numbers in java without array?

926


What are alternatives to java serialization?

1052


Can a java program have 2 main methods?

998


What is the nested interface?

1040


Is heap stored in ram?

903


What is the use of pattern in java?

994


What are selection structures?

937


What do you understand by the bean persistent property?

949


What is operator overloading. Is it is supported in java?

947


What is sizeof in java?

1049


What java ide should I use?

931


Why main method is called first in java?

948


Explain when noclassdeffounderror will be raised ?

988