Get Answers to all your Questions

header-bg qa

Is interface or an abstract class .which is better ?

Answers (1)

best_answer

An interface only allows you to define functionality, not implement it but an abstract class allows you to create functionality that subclasses can implement or override.

A class can take advantage of multiple interfaces but can extend only one abstract class. 

So as both of them have different usage and benefits, the answer to the question which is better lies in our expectation and usage.

Posted by

Deependra Verma

View full answer