Rule 5:For instance control, prefer enum types to readResolve
Instance Control : singleton class
public class Elvis {
public static final Elvis INSTANCE = new Elvis();
private Elvis() { … }
public void leaveTheBuilding() { … }
}
Above class would no longer be a singleton if the words implements Serializable were added to its declaration.
readResolve and enum are the ways to control instance