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 / sreekanta paul

In C++ when a subclass inherits a superclass then the name of superclass is specified.But in java it is quite confusing from which superclass a method will be inherited by the subclass.Suppose wo 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?
Thats why in java the concept of Interface came to solve this problem.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is casting in java programming?

1032


Can a class extends itself in java?

1025


How to display all the prime numbers between 1 and 100

1015


What are thread local variables?

1151


Explain different ways of creating a thread. Which one would you prefer and why?

1040


What does the three dot emoji mean?

1124


What is the benefit of inner classes in java?

1087


What does flagged out mean?

1061


Where is the find and replace?

1004


Is main an identifier?

1012


What’s meant by anonymous class?

1086


What is meant by 'Class access modifiers'?

1047


What is the properties class in java programming?

1004


How do you override a variable in java?

1146


How many static init can you have?

1216