Difference between abstract class and interface

Answers were Sorted based on User's Feedback



Difference between abstract class and interface..

Answer / vamsikrishna

An abstract class can contain all the abstract methods are
all the concrete methods are both.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / geetika.......:)

1)all methods in interface need to be defined in class that implemented it.but abstract class may define all some or none of the methods declared in it.
2)abstract class cant instantiate object but class with interface can
3)interface do not have constructors abstract classes have
4)class may implement number of interfaces but can extend only one abstract class
5)variables must be initialized in interface but its not necessary in abstract class.
6)interface has abstract functions but abstract class has abstract as well as concrete functions.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / sunil

abstract class dose not supports multiple inheritance while
interface supports multiple inheritance

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / pavan kumar.m

Anterface :
In interface all d methods are abstrct,we use interface for
defining constants interface is cant directly inherited
with any class .Interface is defined
independently,interface have inherited related
relationship with inheritance only.
Abstract class:
In abstract class some methods are abstract methods and
these classes are used to prevent the creation of
object,these classes are used to define fields.
Abstract methods having abstract modifiers

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / venkataramana

A method with method body is called "Concrete method or
Complete method".
A method without method body is called as "Abstract Method".

Abstract Class :
----------------
1.An abstract class is a class which contains 0 or more
abstract methods.
2.An abstract class can have ,
* Instance Variables
* Complete Methods
* Abstract Methods
3.When an abstract class is written, it is the duty of the
programmer to provide sub classes to it.
4.We cannot create an object to abstract class.
5.But we can create a reference to the abstract class.
6.we cannot declare a class as both abstract and final.

Interfaces:
-----------
1.An interface is a specification of method prototypes.
2.An interface contains only "Abstract Methods".
3.An interface contains Constants
4.All the methods of an interface can be "abstract and
final" by default.
5.We cannot create an object to abstract class.
6.But we can create a reference to the abstract class.
7.An interface is written , when the programmer wants to
leave the implementation to the thid party vendors.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / venkatesh

1)Both Abract class and Interface not instantiable but
refernce can be created.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / sachin pawar

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 ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / owzy

We can't instantiate an Abstract Class.Objects can't be
formed from Abstract class.
Abstract classes are meant to be inherited only

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / sudhakar

An Abstract class contains both abstract and non abstract methods.but the interface contains only abstract methods.
Abstract methods declared with the keyword Abstract where interface declared with interface keyword.

By using interface concept multiple inheritance is support.

Is This Answer Correct ?    1 Yes 0 No

Difference between abstract class and interface..

Answer / aktharul ameen

1.Abstract class is act as a base class which define some
rule to its sub class or derived class where as interface
gives its methods and properties to be implemented by
derived class

2.Abstract class can be private,public etc...where as
interface are intended for public only.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

What is the difference between SAX Parser and DOM Parser?

2 Answers   QBit Systems, TCS,


hi, kindly send WWF(.net 3.5) pdf notes to my id. thanx in advance, chays

0 Answers  


What is an interrupt? : Dot net architecture

0 Answers  


How to improve the cache performance? : Dot net architecture

0 Answers  


Let's say I have an existing application written using Visual Studio 6 (VB 6, InterDev 6) and this application utilizes Windows 2000 COM+ transaction services. How would you approach migrating this application to .NET ?

1 Answers  


What are the important principles of soa (service oriented architecture)?

0 Answers  


Please tell me the .net 2.5 frame work with example

2 Answers  


What is Object Caching in Visual Studio 2010?

0 Answers   Arigo Infotech,


how windows applications different from the console applications?

1 Answers   Six Sigma,


Explain the Lapsed Listener problem in .net

0 Answers   HCL,


Can I create my own context attributes?

0 Answers  


how do create a repeater

3 Answers  


Categories