Core Java
-
Chain Of Responsibility Design Pattern Example
Avoid coupling the sender of a request to the receiver by giving more than one object a chance to handle…
Read More » -
OutOfMemoryError: unable to create new native thread – Problem Demystified
As you may have seen from my previous tutorials and case studies , Java Heap Space OutOfMemoryError problems can be…
Read More » -
Multiple versions of Java on OS X Mountain Lion
Before Mountain Lion, Java was bundled inside OS X. It seems that during the upgrade, the Java 6 version I…
Read More » -
Using PowerMock to Mock Constructors
In my opinion, one of the main benefits of dependency injection is that you can inject mock and/or stub objects…
Read More » -
Java Hidden code
Sometime ago I came across the issue of invisible characters in Strings. These can really cause confusion because they are…
Read More » -
Duck typing in Java ? Well, not exactly
According to Wikipedia duck typing is: style of dynamic typing in which an object’s methods and properties determine the valid…
Read More » -
Building OpenJDK on Windows
Doing some experiments, I found that it often useful to have JDK source code available in hand to make some…
Read More » -
Java Annotations – Retention
Consider a Java annotation: public @interface AnAnnotaton { } A class with this annotation applied on it: @AnAnnotaton class AnAnnotatedClass{…
Read More » -
A Generic and Concurrent Object Pool
In this post we will take a look at how we can create an object pool in Java. In recent…
Read More »