Home > DeveloperSection > Interviews > Differentiate between an abstract class and an interface.

Posted on    September-04-2014 11:36 PM

 C# C# 
 1 Answer(s)
  948  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    September-04-2014 12:00 AM

Abstract Class:

A class can extend only one abstract class

The members of abstract class can be private as well as protected.

Abstract classes should have subclasses

Any class can extend an abstract class.

Methods in abstract class can be abstract as well as concrete.

There can be a constructor for abstract class.

The class extending the abstract class may or may not implement any of its method.

An abstract class can implement methods.


A class can implement several interfaces

An interface can only have public members.

Interfaces must have implementations by classes

Only an interface can extend another interface.

All methods in an interface should be abstract

Interface does not have constructor.

All methods of interface need to be implemented by a class implementing that interface.

Interfaces cannot contain body of any of its method.

Don't want to miss updates? Please click the below button!

Follow MindStick