Question d’entretien chez Subex

What is difference between Interface and Abstract class? Why do we need abstract class when we have interface anyway?

Réponse à la question d'entretien

Utilisateur anonyme

1 déc. 2015

Interfaces are like different masks that a class wears. Interface are essentially outword looking, how does outside world looks at you class. Where Abstract class in inward looking, as when need to have some facility pre-built and if specific behavior to be implementation to be enforced to derived classes one uses Abstract class. Philosophically there is nothing common between them.