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 / smitha

Java supports multiple inheritence indirectly through the
use of interface. In case we are able to extend more than
one class then there would be a confusion of which method to
process in case both classes have same method name(Same
method signature also).

In case of using interfaces to support multiple inheritance
we escape this problem as we define the methods that are
needed only.

Is This Answer Correct ?    232 Yes 54 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if I write static public void instead of public static void in java?

1037


Explain the difference between abstract classes and interfaces in java?

1104


What is method in java ?

1023


How do you add an element to a set in java?

982


Does importing a package imports its sub-packages as well in java?

933


What is a war file?

1019


Can we have more than one package statement in source file ?

976


What is the difference between iterator and list iterator?

980


What is an immutable object?

1050


Is it possible to instantiate the abstract class?

917


How do I print a “?

953


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

2246


Explain the difference between jdk, jre, and jvm?

1002


How to create a base64 decoder in java8?

1012


How can we pass argument to a function by reference instead of pass by value?

1054