title: Java singleton inner class
body: <p>I know the concept of singleton in Java.
  I'm having problems with creating singleton as inner class in Java. Problem occurs at holder's </p>
  
  <pre><code>public class NormalClass {
      private class Singleton {
          private static Singleton instance = null;
  
          private Singleton() {
          }
  
          private static class SingletonHolder {
              private static Singleton sessionData = new Singleton();
          }
  
          public static Singleton getInstance() {
              return NormalClass.Singleton.SingletonHolder.sessionData;
          }
      }
  
      public void method1() {
          Singleton.getInstance();
      }
  }
  </code></pre>
  
  <p>Error is at new Singleton() constructor call. How to proper call private constructor of Singleton as inner class?</p>
  
  <p>Regards</p>