Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Difference between abstract class and interface

Answers were Sorted based on User's Feedback



Difference between abstract class and interface..

Answer / shilpa

Abstract classes can have implementations for some of its
members (Methods), but the inteface class can't have
implementation for any of its members.

Is This Answer Correct ?    1291 Yes 233 No

Difference between abstract class and interface..

Answer / 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

Difference between abstract class and interface..

Answer / maneswari

Interfaces provide a form of multiple inheritance. A class
can extend only one other class.
Interfaces are limited to public methods and constants with
no implementation. Abstract classes can have a partial
implementation, protected parts, static methods, etc.
A Class may implement several interfaces. But in case of
abstract class, a class may extend only one abstract class.
Interfaces are slow as it requires extra indirection to to
find corresponding method in in the actual class. Abstract
classes are fast.

Is This Answer Correct ?    439 Yes 93 No

Difference between abstract class and interface..

Answer / nikhil

1. Accessibility modifier(Public/Private/internal) is
allowed for abstract class.
Interface doesn't allow accessibility modifier

2. class can inherit only one abstract class
class can implement more than one interface.

Is This Answer Correct ?    375 Yes 78 No

Difference between abstract class and interface..

Answer / karthik

Abstract classes can have implementations for some of its
members (Methods), but the inteface class can't have
implementation for any of its members

Is This Answer Correct ?    247 Yes 49 No

Difference between abstract class and interface..

Answer / vinay tiwari

in Abstract Class atleast one method is undefined where as
in interface all method is undefined

Is This Answer Correct ?    337 Yes 170 No

Difference between abstract class and interface..

Answer / ramana

1) Abstract class is must inheritable & its scope is upto
derived class

2) Interface is must implementable & its scope is upto any
level of its inheritence chain.

Is This Answer Correct ?    162 Yes 50 No

Difference between abstract class and interface..

Answer / 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

Difference between abstract class and interface..

Answer / priyanka

Interfaces have only declarations of methods but abstract
classes can also have implementations of some methods.

Is This Answer Correct ?    90 Yes 19 No

Difference between abstract class and interface..

Answer / chetan s

1. Interface comes in Inheritance chain while Abstract not
2. One class can inherit muliple interface but it can't
inerit mulitple abstract class
3. Abstract class can have concert method but interface
can't.
4.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.
5.Abstract classes are faster than interfaces.

Is This Answer Correct ?    108 Yes 41 No

Post New Answer

More Dot Net AllOther Interview Questions

how to find the 2nd higgest salary in the column for example take table name is employee? And also find bottom 2nd lowest salary ?

11 Answers   GeoTechnology, Wipro,


Is dim fs as filestreamobject is a managed code? : Dot net architecture

0 Answers  


State and explain about microsoft.net?

0 Answers  


Explain about common language infrastructure?

0 Answers  


What is the difference between a web custom control,web user control and a web part.

1 Answers   247Customer,


Explain the Lapsed Listener problem in .net

0 Answers   HCL,


how to set the startup position of the form?

0 Answers   Six Sigma,


how to make and display a form without title bar?

0 Answers   Six Sigma,


What is new in the .net 2.0 class library?

0 Answers  


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

0 Answers  


difference between Response.write,server.transfer and also which one is used when ?

0 Answers  


Explain about metadata?

0 Answers  


Categories