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

What is mdb and what is the special feature of that?

1018


What is a sessionfactory? Is it a thread-safe object?

1173


What are the different class loaders used by jvm?

1057


What is Stream Tokenizer?

2188


Explain about RMI Architecture?

1039


What is the purpose of the wait() method?

1121


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

4184


What is glasgow?

1004


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2736


How to implement RMI in Java?

2840


What is bean? Where can it be used?

1084


Explain the difference between object state and behavior?

1005


Describe responsibilities of Activator?

2184


What is the difference between RMI and Corba?

2687


What is the difference between the ‘font’ and ‘fontmetrics’ class?

1115