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


Please Help Members By Posting Answers For Below Questions

Can you Explain element .net mobile with example? : Microsoft dot net mobile

718


Define domestic architecture artifacts? : Dot net architecture

715


Explain what does the term "green architecture" mean? : Dot net architecture

764


Explain domestic architecture artifacts? : .NET Architecture

725


What re interop services?

779


Define dma? : Dot net architecture

745


Differnce between managed code and unmanaged code ?

744


Explain .net mobile events? : Microsoft dot net mobile

716


What is different about namespace declaration when comparing that to package declaration in java?

744


Explain the Lapsed Listener problem in .net

863


Explain about cookie less session state? : .NET Architecture

760


Explain how does .net mobile work? : Microsoft dot net mobile

676


What is the numeric attribute of the textbox control in .net mobile? : Microsoft dot net mobile

742


server.transfer limitation ?

1985


How to upload in video,mp4,in .net 4.5 ..?

741