Subex interview question

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

Interview Answer

Anonymous

Dec 1, 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.