Difference between abstract class and interface
Answer Posted / karthick
Unlike interfaces, abstract classes can contain fields that
are not static and final, and they can contain implemented
methods. Such abstract classes are similar to interfaces,
except that they provide a partial implementation, leaving
it to subclasses to complete the implementation. If an
abstract class contains only abstract method declarations,
it should be declared as an interface instead.
Multiple interfaces can be implemented by classes anywhere
in the class hierarchy, whether or not they are related to
one another in any way. Think of Comparable or Cloneable,
for example.
By comparison, abstract classes are most commonly subclassed
to share pieces of implementation. A single abstract class
is subclassed by similar classes that have a lot in common
(the implemented parts of the abstract class), but also have
some differences (the abstract methods).
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain different pipelining hazards and how are they eliminated? : .NET Architecture
Explain cache? : .NET Architecture
So what exactly is the configuration file for then?
difference between Response.write,server.transfer and also which one is used when ?
What is the difference between an application and a program?
What are end points, contract, address and bindings?
What is difference between .net and visual studio?
How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
Explain write back and write through caches? : Dot net architecture
What are the major differences between services and web services?
How to upload in video,mp4,in .net 4.5 ..?
Explain about cookie less session state? : .NET Architecture
What is .net mobile automatic paging? : Microsoft dot net mobile
Can I customise the trace output?
HttpHendler and HttpModules