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

difference of inheritance and interface

Answer Posted / rahul

The most important technical distinction between creating a
derived class and implementing an interface is that a
derived class can only inherit from one base class, but a
class can implement any number of interfaces.

From a design standpoint, think of inheritance as expressing
a specialization hierarchy. If WebSalesOrder "is a" special
kind of SalesOrder, you might consider making it a derived
class.

However, you need to be very careful that you don't use
inheritance when the specialization that distinguishes a
derived class from a base class is a feature that other
classes will also need to support. For adding those kinds of
features or capabilities to a class, implementing interfaces
will give you much greater flexibility.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

1104


Can I map more than one table in a cmp?

1128


Is infobus easy to use?

1084


What are the different methods of identifying an object?

1128


Which are the different segments of memory?

1147


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

3058


What is permgen or permanent generation?

1080


What are the purpose of introspection?

1258


Describe responsibilities of Activator?

2355


What is ioc concept & explain it?

1138


What is the difference between long.class and long.type?

1177


How to deploy Jar, War files in J2EE?

2733


Can you give me a simple example of using the requiredif validator rule?

1184


What are the diff types of exception?

1118


What is the difference between system.out ,system.err and system.in?

1162