Difference between abstract class and interface
Answer Posted / thakur laxmikant
1. Abstract class can have implemented methds
but interface contains only final varibles and
method declaration(signature);
2. In Abstract class there is "IS A " Kind of relationship
between abstract class and its implemented method class
but in interface it can be between any non-relative
classes.
3. Absrtact class can be extended by only one class;
Interface can be implemented by more than one class;
ie. class can inherit only one abstract class
but class can implement more than one interface.
4.A class implementing an interface has to
implement all the methods of the interface,
but the same is
not required in the case of an abstract Class.
5.Access modifiers (protected, abstract, public, etc. )are
useful in abstract Classes but not in interfaces.
| Is This Answer Correct ? | 20 Yes | 7 No |
Post New Answer View All Answers
Explain what does the term "green architecture" mean? : Dot net architecture
how to set the startup position of the form?
What does the term "green architecture" mean? : Dot net architecture
What is private constructor? And it's use?
Explain How to improve the cache performance? : Dot net architecture
if there are two application 1 and 2 having a variable x in both app if client1 changes value of x in 1 app client 2 want reads the value of x from 2 app what resultant value will he get
What is new in the .net 2.0 class library?
How is the using() pattern useful? What is idisposable?
What is a managed code is dim fs as filestreamobject is a managed code? : .NET Architecture
What is a service class?
The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.
Explain about developer benefit from memory management?
What is Video Streaming in .net??
what is sessions and cookies take one example simple way to understand
Explain write back and write through caches? : .NET Architecture