设计模式

第一种:单列模式

我个人理解就是一个类只实例化一次

static myclass instance=null;

public myclass

{

if(instance==null)

{

mc =new myclass();

}

}

 

 

posted @ 2012-05-02 11:13  咸鱼公子  Views(79)  Comments(0)    收藏  举报