public class Singleton {
   public static Singleton singleton = null;
   private Singleton() {}
   public static Singleton getInstance() {
     if(singleton == null) {
       singleton = new Singleton();
     } else {
       System.out.println("no more than one instance can be created");
     }
     return singleton;
   }
}
