Saturday, June 4, 2016

Question : When to use interface and when to use Abstract Classes

Answer : In the starting of project, we have SRS and we do not know much about implementation so we will have to choose interface while if we have some idea about implementation (Partial Implementation) the we can choose Abstract Classes.

Question : Which one is better- Interface or Abstract Class

Answer : As per my understanding, Interface is better.
Why Because, it provides 100% abstraction and another thing, we can achieve multiple inheritance.

No comments:

Post a Comment