Do you know how to use lazy initialization in Java? There’s already many thread discussing this problem in the comunity, just to conclude here.
Due to the JVM memory model, Double-Checking Locking (DCL) will not work in Java, I’d like to recommend two articles talking about this.
The "Double-Checked Locking is Broken" Declaration
Double-checked locking and the Singleton […]
