Was this helpful?
0 votes
|
At a recent interview I was asked about the difference between an interface vs and an abstract class and when to use which one. I answered that that interfaces do not have any implementation whereas an abstract class does. So, an abstract class can have one or more be abstract members (i.e. without implementation) with other members implemented. What I did not answer really answer is when which one is preferred. From the body language of the interviewer I felt he was not very satisfied, but I could not think of an example of when to use an interface over an abstract class or the other way around. Can someone tell me how I did and/or what I was missing? |
asked | May 09, 2016 |
viewed | 334 times |
active | May 10, 2016 |