4
Reply

What is the difference between Interface and an abstract class if all the methods of abstract class are declared as abstract?

Ramu Neelam

Ramu Neelam

17y
8.1k
0
Reply

    Sorry my previous answer was under the impression that it was a CPP question. C# interfaces support properties.

    Still I believe architectural need ie;generalization and realization realtions is the major deofference or which causes all differences which are means to achieve these goals.

    An abstract class can have member variables(data mrmbers) where as an interface can have only member functions.

    Interafce is realization utility,Abstract class is generalization utility.(Check OOPc and UML)

    Neither Interface or Abstract classes can be instantiated. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.

    If all the methods of the abstract class is abstract then this class will looks like a Interface but with the restriction that it cannot make a class inherit from it.

    logically there is no diff. but there is diff. in some functionality i guess that while creating ur own class u can implement more than one interface but not more than one class