What is the difference between Abstract and Interface?

Answers were Sorted based on User's Feedback



What is the difference between Abstract and Interface?..

Answer / vishal singh

In an interface class, all methods are abstract - there is
no implementation. In an abstract class some methods can
be concrete - there can be implementation. In an interface
class, no accessibility modifiers are allowed - are public
by default. In an abstract class accessibility modifiers
are allowed.

Is This Answer Correct ?    146 Yes 18 No

What is the difference between Abstract and Interface?..

Answer / anand

Abstract Class:

1. Abstract Class Can contain Abstract Methods and Non-
Abstract Methods.

2. When a Non-Abstract Class is Inherited from an Abstract
Class, the Non-Abstract Class should provide all the
implementations for the inherited Abstract Method.

Interface:

1. Interface is nothing but Pure Abstract Class ie
Interface can contain only the function declaration.

2. All the members of the interface are Public by Default
and you cannot provide any access modifiers.

3. When a class is inherited from the interface, the
inherited class should provide actual implementations for
the inherited members.

Is This Answer Correct ?    80 Yes 18 No

What is the difference between Abstract and Interface?..

Answer / nasir munda

In abstract class public,private and protected method can used.

In Interface only public method can used.

Is This Answer Correct ?    46 Yes 7 No

What is the difference between Abstract and Interface?..

Answer / nasir munda

Abstract Class may contain constructor but interface does
not contain constructor.

Is This Answer Correct ?    33 Yes 8 No

What is the difference between Abstract and Interface?..

Answer / nitin kumar tomar

In interface All methods are abstract but in Abstract Class
some methods could be concrete.
There is no Methods Implimentation is allowed inside
interface and also No accessibility modifiers are not
allowed in interface.

Is This Answer Correct ?    31 Yes 11 No

What is the difference between Abstract and Interface?..

Answer / jitendra yadav

Abstract Class may contain constructor but interface does
not contain constructor.

Is This Answer Correct ?    25 Yes 8 No

What is the difference between Abstract and Interface?..

Answer / vanam santhosh

1.All the methods declared in interface are abstact whare
as Abstract must have atleast one abstact and others may
Concrete methods.
2.In abstact class Keyword is abstract must be used for the
methods.In Interface need not use the Keywords.
3.Abstact class must have subclass. where ads in Interfcs
need not have subclass.
4.In Abstarct class can extend only one class.where as in
Interface we can extend more than One Interface

Is This Answer Correct ?    28 Yes 16 No

What is the difference between Abstract and Interface?..

Answer / munwar

Interface and abstract class are just same,but both have
their own usability and advantages..

Difference b/w both.
1). Interface is highlevel abstract(means there is no
single implementation), but in abstract class there can be
implementation.
2)Interface does not allow accessfiers like
public,private.. but abstract class allow these accessifiers

3) Interface does not supports contant values but abstract
calss supports constatnt values..

4) Interface supports multiple inheritance but class does
not support multiple inheritance..

5).interface can not implement abstract class but abstract
calss can impelment interface...

Is This Answer Correct ?    12 Yes 0 No

What is the difference between Abstract and Interface?..

Answer / sanjay

In the abstract class we can define the member function
but in interface we can not define only declare the
function.

Is This Answer Correct ?    11 Yes 1 No

What is the difference between Abstract and Interface?..

Answer / saurabh

you can define variables in abstract class but this is not
allowed in interfaces.

Is This Answer Correct ?    20 Yes 11 No

Post New Answer

More C Sharp Interview Questions

Why do we need constructor?

0 Answers  


How to generate strong name key file or which command is used to generated strong name key file?

0 Answers   CitiusTech,


What is datetime parse in c#?

0 Answers  


What is boolean method?

0 Answers  


What is difference between assembly and dll?

0 Answers  






c# code for how to merge two sorted arrays Input : A = 2,5,8,4 B = 3,9,10,5 Output : 2,3,4,5,5,8,9,10

3 Answers  


What are properties and indexer?

3 Answers   TCS,


What is ac callback?

0 Answers  


What is strong name in c# and how can we use it?

0 Answers   DELL,


Can we create instance for Abstract class?

28 Answers   HCL, Satyam, SoftSol, Wipro,


How many types of constructors are there in c#?

0 Answers  


What is lock statement in C#?

0 Answers   B-Ways TecnoSoft,


Categories