Beauty and strangeness of generics

Recently, I was preparing for my Oracle Certified Professional, Java SE 7 Programmer exam and I happened to encounter some rather strange-looking constructions in the realm of generics in Java. Nevertheless, I have also seen some clever and elegant pieces of code. I found these examples worth sharing not only because they can make your design choices easier and resulting code more robust and reusable, but also because some of them are quite tricky when you are not used to generics. I decided to break this post into four chapters that pretty much map my experience with generics during my studies and work experience.

Continue reading “Beauty and strangeness of generics”