Showing posts with label inheritance. Show all posts
Showing posts with label inheritance. Show all posts

Tuesday, March 17, 2015

Differences between abstract class and interface

it is obvious, right?

No, it’s not. I have conducted a lot of interviews and very often one of the first questions I used to ask was the one about the differences between interface and abstract class. And still I met a lot of programmers who couldn’t give me the right answer.
In my opinion even a junior programmer should know them, maybe not necessarily with understanding what reasons lie behind, but still ­­­­­- structural differences, specific for particular language (and the same for almost all OOP languages) should be more than known.

What do I find instead? Candidates who were applying for other positions (sometimes even senior ones) who didn’t knew the differences or knew only a few or one.
I know that only the things that we know very well are easy, but those are OO basics and we have to know them to write well-designed code.