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
How a component can be placed on Windows?
Where we can write Rmi registry in the code, without having to write it at the command prompt?
How to determine SGA site?
Explain the steps in details to load the server object dynamically?
If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?
What do you need to set-up a cluster with jboss?
What value does readline() return when it has reached the end of a file?
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?
Write a singleton program?
Can I use javascript to submit a form?
wahts is mean by dynavalidatorform in struts/
whats is mean by tiles in struts
What is permgen or permanent generation?
What are the different class loaders used by jvm?
Define the remote object implementation?