//¶àÏß³Ìµ¥ÀýÄ£Ê½
class Singleton {
    private static Singleton instance;
    //synchronized¼ÓËøÍ¬²½»á½µµÍÐ§ÂÊ,ÕâÀïÏÈÅÐ¶ÏÊÇ·ñÎª¿Õ
    //²»Îª¿ÕÔò²»ÐèÒª¼ÓËø,Ìá¸ß³ÌÐòÐ§ÂÊ
    //²¹È« ¹¹ÔìÆ÷
  private Singleton(){}
    
    public static Singleton getInstance (){
        //²¹È« ´´½¨ÊµÀý
      if(instance ==null){
        synchronized(Singleton.class){
          if(instance ==null){
            instance = new Singleton();
          }
        }
      }
        
        return instance;
    }
}