difference of inheritance and interface
Answers were Sorted based on User's Feedback
Answer / anandhi
INHERITANCE:diriving new class from existing class...
types: single ,multiple,....etc.
its nt support multilevel inhertance...
so we can use interface....
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / 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 |
Answer / prabha
interface can extend only once but implement more
inheritance can extend more time
| Is This Answer Correct ? | 0 Yes | 3 No |
What is synchronization?
Can constructors be synchronized in java?
What invokes a thread?s run() method?
How do you set security in applets?
when we applied start()method on a thread ,how does it know that to execute run()method on that object?
Why doesn’t the focus feature on the tag work in every circumstance?
Can you give me a simple example of using the requiredif validator rule?
iam writing the contents to a excel through I/O i am putting first statement as WRITE and then READ(from excel) immediately..later user complains that he is not getting the date by using READ ..wat could be the situation
In real time project when will we use Abstract class. and what are the difference between abstract and interface.
6 Answers DELL, FCS, Polaris, Tanla Solutions, TCS,
I wantr to know, How many number of users logged in to website? can any one answer
What is colon_pkg_prefixes and what is its use?
What is the highest-level event class of the event-delegation model?