设计模式
赤天青云
这个作者很懒,什么都没留下…
展开
-
单例模式双检锁 volatile 详解
前言 单例模式在平时算比较常见,有关java单例模式的写法有很多种,在这里分析一种比较好的写法。 代码 public class Test { private volatile static Test instance; private Test() { } public static Test getInstance() { if (instance == null) { synchronize...转载 2020-05-12 11:42:19 · 345 阅读 · 0 评论 -
设计模式相关
https://www.runoob.com/design-pattern/design-pattern-tutorial.html原创 2020-05-09 18:00:52 · 108 阅读 · 0 评论