package com.iluwatar.singleton;

/**
 * Thread-safe Singleton class.
 * The instance is lazily initialized and thus needs synchronization
 * mechanism.
 */
public class ThreadSafeLazyLoadedIvoryTower {

  private static ThreadSafeLazyLoadedIvoryTower instance = null;

  private ThreadSafeLazyLoadedIvoryTower() {
  }

  /**
   * The instance gets created only when it is called for first time.
   * Lazy-loading
   */
  public synchronized static ThreadSafeLazyLoadedIvoryTower getInstance() {

    if (instance == null) {
      instance = new ThreadSafeLazyLoadedIvoryTower();
    }

    return instance;
  }
}

@@ -145,16 +145,135 @@
 hanism.%0A
+ *%0A * Note: if created by reflection then a singleton will not be created but multiple options in the same classloader%0A
  */%0Apubl

Update comment