title: Why private static field = new Singleton is not lazy in Java?
body: <p>I read a lot of articles about Singleton, in most of which authors said that this variation of Singleton in Java:</p>
  
  <pre><code>public class Singleton {
      private static Singleton instance = new Singleton();
  
      private Singleton() {}
      public static Singleton getInstance() {
          return instance;
      }
  }
  </code></pre>
  
  <p>is <strong>NOT LAZY</strong> (<em>EAGER then</em>).</p>
  
  <p>But I can't understand why, <code>Singleton()</code> constuctor will be invoked only on <code>Singleton</code> class initialization. I know several reasons, which can trigger class initialization:</p>
  
  <ol>
  <li>Using <code>new</code> with constructor (but in this case constructor is private).</li>
  <li>Accessing or setting up static field (here private).</li>
  <li>Using static method.</li>
  <li>With reflection: <code>Class.forName("Singleton")</code>.</li>
  </ol>
  
  <p>So here our object will be created only on using static method <code>getInstance()</code> (it is still <strong>LAZY</strong> initialization I guess) and with reflection (but reflection can ruin a lot of Singleton variations, except <code>enum</code> maybe).</p>
  
  <p>Maybe I can't see something obvious, explain me please, where was I wrong?</p>