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

For ejb applications with bean-managed transaction demarcations, which of the following is used by the client to get a reference to the usertransaction object for the weblogic server domain?

936


What is stateful or stateless?

913


how can u integrate ejb and hibernate? How can u call hibernateDAO methods in session bean?

2911


How can I access ejb from asp?

995


What is session facade in ejb?

959


What is ptp model?

934


What is difference between ejb and spring?

935


How does the server decide which beans to passivate and activate?

1048


Why is ftp stateful?

970


Differentiate Phantom from Un-repeatable?

1042


Which of the recommended practices to be performed in the ejbpassivate() method of a stateful session bean?

1050


What is ejb role in j2ee?

1052


Explain transaction and various methods to manage it?

915


What is backing bean?

991


What are the key features of the ejb technology?

1024