Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: eliminated extraneous variable from CS

...

Code Block
bgColor#ccccff
final class Foo {
  private static Helper helper;

  // Lazy initialization 
  private static class Holder {
    static Helper helper = new Helper();
  }

  public static Helper getInstance() {
    return Holder.helper;
  }
}

...