Difference between abstract class and interface

Answer Posted / arjunrao

(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 ?    591 Yes 61 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

server.transfer limitation ?

1776


Explain 'managed' mean in the .NET context

682


12. Types of polymorphisem[Run and Design Exp.]

1640


Explain cache? : .NET Architecture

544


What are .net mobile controls features? : Microsoft dot net mobile

480






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.

14046


Explain the five stages in a dlx pipeline? : Dot net architecture

476


what is diffrent beatween localprinter and networkprinter

1348


Define cache coherency? : Dot net architecture

560


What are the different pipelining hazards? : Dot net architecture

564


What is .net transaction?

467


So what exactly is the configuration file for then?

545


What is the difference between primary & secondary storage device? : Dot net architecture

512


Explain about generation?

554


Whats new features in Visual Studio 2012?

539