Tuesday, February 25, 2014

This powerful Enum - part 1

a few words at the beginning

Today we will take a look at Enums in Java. Let's start with a definition:
Enumeration - a collection of items that is a complete, ordered listing of all of the items in that collection.
Sounds simple isn't it? Even if, Enums in Java allows us for many things and it's a really great language's feature, which can increase quality of our code.

Monday, February 17, 2014

What happens in try-catch-finally?

let's talk about basics

Try-catch is the most popular way to handle exceptions and with finally block you can really make your code cleaner and make life of all developers who will use it - easier.
As usual I will cover whole code with tests to proof that it works as expected (this time without TDD, because it wouldn't give us any advantages).