I am wondering which one is better in practice in a multithreaded environment. I understand Singleton as Enum type creates an instance when the class is loaded. Other than that I don't see anything else significant. Is there any pros and cons ?
Singleton as Enum type:
 public enum Singleton {
      INSTANCE;
      public void doSomething(){ ... }
 }
Singleton with double-checked locking:
 public class Singleton{
      private volatile static Singleton instance;
      private Singleton(){}
      public static Singleton getInstance(){
           if(instance == null){
                 synchronized(Singleton.class){
                       if(instance == null){
                           instance = new Singleton();
                       }
                 }
           }
           return instance;
      }
 }