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

How does bubble sort work?

0 Answers  


What is the main method?

0 Answers  


Does main have to be static c#?

0 Answers  


What is event sourcing in c#?

0 Answers  


Can class be protected in c#?

0 Answers  






Can firstordefault return null?

0 Answers  


A->B->C (EXTENDS) How the constructors are called when we created an object of C

3 Answers   Karur Vysya Bank KVB,


How can we sort the elements of the array in descending order?

0 Answers  


What is continue in c#?

0 Answers  


Can we declare private class in c#?

0 Answers  


What are expressions c#?

0 Answers  


How do you pass reference parameters in c#?

0 Answers  


Categories