package com.test.design.singleton;
public class Singleton {
private static Singleton instance = new Singleton();
private Singleton(){
}
public synchronized static Singleton getInstance(){
return instance;
}
}
单例模式
最新推荐文章于 2024-07-25 13:59:31 发布