From Head First design patterns book, the singleton pattern with double checked locking has been implemented as below:
public class Singleton {
Double checked locking is a technique to prevent creating another instance of singleton when call to getInstance method is made in multithreading environment.
volatile keyword on the declaration of the instance member. This will tell the compiler to always read from, and write to, main memory and not the CPU cache. With volatile variable guaranteeing happens-before relationship, all the write will happen before any read of instance variable.volatile keyword to work properly, it's not compatible with Java 1.4 and lower versions. The problem is that an out-of-order write may allow the instance reference to be returned before the singleton constructor is executed.Detailed description each of them is too verbose so I just put a link to a good article - All you want to know about Singleton