摘要: public class Singleton { //volatile变量,用来确保将变量的更新操作通知到其他线程 private volatile static Singleton instance=null; private Singleton() {} public static Singleton getInstance() { ... 阅读全文
posted @ 2017-11-10 18:40 cxiaoluab 阅读(101) 评论(0) 推荐(0) 编辑