-
成员均为静态(math,Arrays,Collection)
-
单例设计模式(Runtime)
至于不了解什么是单例设计模式的话请跳转https://blog.csdn.net/dmk877/article/details/50311791
-
类中有静态方法返回该类的对象(InetAddrass)
例子:
class Demo{
private Demo(){}
public static Demo getXxx(){
return new Demo();
}
}
成员均为静态(math,Arrays,Collection)
单例设计模式(Runtime)
至于不了解什么是单例设计模式的话请跳转https://blog.csdn.net/dmk877/article/details/50311791
类中有静态方法返回该类的对象(InetAddrass)
例子:
class Demo{
private Demo(){}
public static Demo getXxx(){
return new Demo();
}
}
转载于:https://www.cnblogs.com/xiaolongdejia/p/11000504.html