单子设计模式

来源:互联网 发布:手机ping测试软件 编辑:程序博客网 时间:2024/03/29 17:30

 public class single {

     private single  singfirst=null;

    private single(){};

     public single getsingle(){

         if(singfirst==null){

              singfirst = new single();

          }

        retutn fingfirs;

 

   }

 

 

}

原创粉丝点击