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

What is the difference between machine config vs. Web config : Dot net architecture

491


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

486


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

506


What is .net mobile automatic paging? : Microsoft dot net mobile

574


Explain .net mobile input controls? : Microsoft dot net mobile

480






Explain about httpruntime.cach.get(); method?

569


What is the access level of the visibility type internal?

602


What is .net transaction?

479


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

459


Explain about common language infrastructure?

562


IS IT Possible to inherit the AJAX page from child class which(child) is inherit from page class.Because i should apply some security in child class

1536


When do I need to use gc.keepalive?

642


Differences between VS 2005, 2008 and 2010 ?

574


Which software is used for .net programming?

518


Explain cache? : .NET Architecture

551