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...


What is the reason that multiple inheritance is not possible
in java??



What is the reason that multiple inheritance is not possible in java??..

Answer / gayathri

This is to avoid "Diamond problem"....Lets say there are 4 classes A,B,C,D..A is a superclass...The two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a method defined in A (and does not override the method), and B and C have overridden that method differently, then from which class does it inherit: B, or C? ...To avoid this issue, Java dint allow multiple inheritance..
Having said that, also note that Java allows multiple inheritance through multiple interface implementation

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More Core Java Interview Questions

Difference between notify() method and notifyall() method in java?

0 Answers  


What is tochararray in java?

0 Answers  


what is function overloading in java?

0 Answers   Tavant Technologies, TCS, Virtusa,


Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?

2 Answers  


What is an abstract class and what is it’s purpose?

0 Answers  


Explain about instanceof operator in java?

0 Answers  


What are predicates in java 8?

0 Answers  


Explain java heap space and garbage collection?

0 Answers  


What are the two categories of data types in the java programming language?

0 Answers  


If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?

0 Answers   Wipro,


If a class is declared without any access modifiers, where can the class be accessed?

0 Answers  


What is methods in java?

0 Answers  


Categories