![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
设计模式
zssz1026
这个作者很懒,什么都没留下…
展开
-
创建型设计模式-Prototype原型设计模式实战
package net.xdclass.prototype; import java.io.*; public class Person implements Cloneable,Serializable{ private String name; private Integer age; public String getName() { return name; } public void setName(String name) { .原创 2021-03-03 10:38:35 · 45 阅读 · 0 评论 -
⼯⼚设计模式
原创 2020-12-22 11:00:19 · 381 阅读 · 0 评论 -
简单工厂模式
原创 2020-12-22 10:21:49 · 45 阅读 · 0 评论 -
单例模式中的饿汉实现和选择问题
package net.xdclass; import java.awt.*; /** * * @Description 单例设计 饿汉方式 **/ public class SingletonHungry { private static SingletonHungry instance = new SingletonHungry(); private SingletonHungry(){} public static SingletonHungry getIns...原创 2020-12-17 10:18:30 · 58 阅读 · 0 评论 -
单例模式中的懒汉实现
package net.xdclass; /** * 小滴课堂,愿景:让技术不再难学 * * @Description 单例设计模式 - 懒汉实现方式 * @Author 二当家小D * @Remark 有问题直接联系我,源码-笔记-技术交流群 * @Version 1.0 **/ public class SingletonLazy { //private static SingletonLazy instance; /** * 构造函数私有化 ...原创 2020-12-16 10:29:28 · 149 阅读 · 1 评论