title: Are there any issues in multithreaded environment with Singleton pattern?
body: <p>I have implemented the Singleton class as below:</p>
  
  <pre><code>public class Singleton {
  
      private static  Singleton instance = null;
  
  
      private Singleton() { 
      }
  
  private synchronized static void createInstance() {
      instance = new Singletone();
  }
  
  
      public static Singleton getInstance() {
          if(instance == null){
              createInstance();
          }
          return instance;
      }
  
  }
  </code></pre>
  
  <p>But I want to know if it is a correct implementation of a singleton.
  Are there any problem in multithreaded environment.</p>