I read at many places that singletons can use interfaces. Some how I am unable to comprehend this.
Something like:
public interface MyInterface { }
And
public class MySingleton implements MyInterface { private static MyInterface instance = new MySingleton(); private MySingleton() { } public static MyInterface getInstance() { return instance; } }