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

Explain Singleton design pattern in .net

732


how to set the startup position of the form?

1666


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

705


Explain what does the term "green architecture" mean? : .NET Architecture

711


What is textview control of .net mobile? : Microsoft dot net mobile

681






How does .net mobile work? : Microsoft dot net mobile

672


What is the difference between metadata and menifest ?

632


any one can explain about projectarchitecture and project approach briefly

2253


I want to create a project like google maps how can we do that with atlas?

645


Explain different pipelining hazards and how are they eliminated? : .NET Architecture

696


Explain the difference between l1 and l2 cache? : .NET Architecture

735


What is cookie less session?

746


What happens when you try to update data in a dataset in .net while the record is already deleted in sql server as backend?

694


Use of Enable view state ? if turn off what happen ?

4102


What does this do? Gacutil /l | find /i "corillian"

780