双检锁(DCL)实现懒汉单例模式
摘要:
public class Singleton{ private volatile static Singleton obj; public Singleton(){} public getSingleton(){ if(singleton == null){ synchronized(Singlet 阅读全文
posted @ 2023-05-19 10:50 A_Nobody 阅读(44) 评论(0) 推荐(0) 编辑