Double Checked Locking Pattern
The Double-Checked Locking pattern used in the class loader testing example is used to lazily initialize the properties. Although there are some side notes with regard to the pattern. First and foremost, it only works for Java 1.5 and up, because of the Java memory model. Most developers shouldn't be worried with it. Quite frankly, the class loader testing example is not the most realistic example of an application for the pattern. Realistically, the best application for it is the lazy initialization of a true singleton instance, of which there are just very few. ...