
设计模式
weixin_42246923
这个作者很懒,什么都没留下…
展开
-
单例模式
目录懒汉式懒汉式线程不安全的单例模式public class Singleton { private static Singleton instance = null; private Singleton() { } public static Singleton getInstance() { if (instance == null) { instance = new Singleton(); } return instance; }.原创 2021-03-10 13:58:31 · 57 阅读 · 0 评论 -
策略模式
参考文献https://www.cnblogs.com/kubixuesheng/p/5155644.htmlhttps://www.cnblogs.com/java-my-life/archive/2012/05/10/2491891.html原创 2021-02-24 13:28:25 · 76 阅读 · 0 评论