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.

Tuesday, March 3, 2015

What’s the deal with serialization?

Today we’re going to talk about a basic, (but from time to time useful) feature of Java — serialization.
Let’s start with theory. So what is serialization?
To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object