Sunday, April 6, 2014

Take a look at Nested Classes

what will it be about?

After a few posts about Enums I want to present you another interesting feature of Java which is Nested Classes.
In next a few articles I will try to introduce to you inner, static nested, local and anonymous classes. Of course, everything with usage of TDD :)

I will start with some basics - how to create a particular type of class, what is allowed and what's not. After introduction we will move forward and I will present some code which will show the ways of usage of those classes and, what's more important, the problems that result from their use.

I've gathered some material, I wrote a couple tests and it's turned around there is more text and code than I expected. That's why I decided to split it into a few shorter posts. Hopefully next ones will be published shortly, everything depends on how fast I will have a possibility to edit them.