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
What is a service contract, operation contract and data contract?
How can I create a application?
Use of Enable view state ? if turn off what happen ?
What is the mesi? : .NET Architecture
Explain the purpose of cache? How is it used? : Dot net architecture
What actually happes when you add a something to arraylistcollection ?
Explain is development of a mobile web application with asp.net is very easy? : Microsoft dot net mobile
what is sessions and cookies take one example simple way to understand
Define an interrupt? : Dot net architecture
What is textbox control of .net mobile? : Microsoft dot net mobile
What is Object Caching in Visual Studio 2010?
Explain about microsoft visual studio?
how to change row background color in gridview
4. Wcf- what Asych and Sych call and how that works
Explain Singleton design pattern in .net