学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

设计模式

设计模式

public  class  student
{
    private   static  student  stu;
    public    static  student  Stu
    {
        get
        {   
            if(stu==null)
            {
                stu=new student();
            }
        return stu;
        }
        
    }
}
请问这是哪个设计模式?
A.prototype         B.singleton         C.abstract  factory          D.builder
这4种模式有什么区别?

TOP

b我也是才看..一起进步
学习需要安静。。海盗要重新来过。。

TOP

singleton
浮生若梦天边月,醉死如酒水中星。红楼一梦千人叹,岂让万夫空做贱。博客:http://hi.baidu.com/rxvip

TOP

发新话题