Summary - Effective Java
Summary - Effective Java
This book gives you a lot of advices how to make your code more correct and perfect.
Item 3: Enforce the singleton property with a private constructor or an enum type
A single-element enum type is the best way to implement a singleton.
//Enum singleton - the preferred approach
public enum Elvis {
INSTANCE;
public void leaveTheBuilding() { . . . }
}