All pastes #984869 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-04-14 16:58 UTC
rendered paste body
public class MySingleton {

   private static MySingleton instance;

   public static MySingleton getInstance() {
       if (instance == null) {
            instance = new MySingleton();
       }
       return instance;
   }

   private MySingleton() {
       //omitted
   }
}