Difference between abstract class and interface
Answer Posted / rubeena
(1) An abstract class may contain complete or
incomplete methods. Interfaces can contain only the
signature of a method but no body. Thus an abstract class
can implement methods but an interface can not implement
methods.
(2) An abstract class can contain fields,
constructors, or destructors and implement properties. An
interface can not contain fields, constructors, or
destructors and it has only the property's signature but no
implementation.
(3) An abstract class cannot support multiple
inheritance, but an interface can support multiple
inheritance. Thus a class may inherit several interfaces
but only one abstract class.
(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) Various access modifiers such as abstract,
protected, internal, public, virtual, etc. are useful in
abstract Classes but not in interfaces.
(6) Abstract classes are faster than interfaces
| Is This Answer Correct ? | 107 Yes | 23 No |
Post New Answer View All Answers
5. Wcf- Session Managment
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.
How can we integrate atlas with web services?
how to create applications by using Visual Studio 2012?
What are bindings?
Describe the Managed Execution Process in .NET?
What is the purpose of cache? How is it used? : Dot net architecture
How can we perform data binding in atlas?
What is cache coherency and how is it eliminated? : Dot net architecture
What is the application frame host?
What is the use of web.config?
Define cache coherency and how is it eliminated? : Dot net architecture
Tell me .net mobile emulators? : Microsoft dot net mobile
Difference between type constructor and instance constructor?
Explain hard disk and what is its purpose? : .NET Architecture