摘要: 懒汉式: 方法上加synchronized public static synchronized Singleton getInstance() { if (single == null) { single = new Singleton(); } return single; } 懒汉式: 使用双 阅读全文
posted @ 2021-12-13 15:25 KLAPT 阅读(66) 评论(0) 推荐(0)