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

java doesnot support multiple inhetance. but a interface can
support.how the ambiguities are rectified in interfaces?

Answer Posted / manish

There are some reasons because of them java soft remove
multiple inheritance -
Suppose there are 4 classes A,B,C,D.

Class A - contains some abstract methods, final methods,
private methods.
Class B - contains some complete methods, some final
methods.
Class C - contains some static methods, complete methods.
Class D - contains some final methods, static final methods
and so on..

And programmer create a subclass for extending these 4
classes like this -

public class ChildClass extends A,B,C,D
{
---------
--------- // lots of confusions for programmer here.
}

The subclass programmer may be confused. Because he need to
concentrate on what are availables in supper classes. Thats
why java soft people remove multiple inhiritance.

But in case of Interface --

public interface childInterface extends Interface_A,
Interface_B, Interface_C, Interface_D
{
--------
-------- // No confusion here. Because Interface contains
only abstract methods. And abstract method doesn't have
body.
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by ‘hot deployment’ ?

1066


What optimization could I use if the ejb container is the only point of write access to the database?

1008


What is stateless programming?

1085


What changes have been made in ejb 2.0 specifications?

1048


How can one EJB be called from within another EJB?

987


List down the steps for the demonstration of ejp persistence mechanism.

1098


What is mdb in ejb?

961


What is the difference between find and select methods in ejb?

1005


What is the meaning of acid in the connection of transaction management?

1048


What were entity beans?

999


What is a stateless session?

1016


What is the purpose of ejb in java?

1072


What are the different kind of ejb's?

1019


can anyone explain me the workflow of EJB.I have developed an app. in WSAD using an example that contains CMP and session bean.But i am not able to understand the basic flow between diffrent packages.

2380


Why do we need ejb in java?

989