import java.io.*; import java.util.*; public final class Preference { /** This is the default instance used for this singleton. */ private static Preference defaultInstance; /** * Constructor of the object. <br> * * This constructor should remain private */ private Preference() { super(); // Put your code here } /** * Gets the unique instance of this class. <br> * * @return the unique instance of this class */ public final synchronized static Preference getInstance() { if (Preference.defaultInstance == null) { Preference.defaultInstance = new Preference(); } return Preference.defaultInstance; } }