Satyasheel Dange
Difference between Abstract class and Interface
By Satyasheel Dange in C# on Mar 21 2013
  • Sundeep  Jaiswal
    Jan, 2016 24

    When you want a class should contains all methods as abstract then that class is called as Interface and on the other hand when one or some methods of the class has abstract method then that class is abstract class.We can achieve multiple inheritance with help of interface by inheriting several interface for a class but in abstract class, a class can inherit only one abstract class.Interface is slower than abstract class.Interface's methods and functions are containing by default public access modifiers as we can have different access modifiers in abstract class.

    • 0
  • balaji badrinath
    May, 2014 17

    An abstract class is a special kind of class that cannot be instantiated. So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.

    • 0
  • srikanth reddy
    Jun, 2013 21

    abstract class will contains both abstract and non abstract members. where as interface class consists only abstract members. Implementation cannot be done in interface class... where as implementation can be done in abstract class for non abstract members.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS