![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
文章平均质量分 77
天才第一步雀氏纸尿裤
这个作者很懒,什么都没留下…
展开
-
设计模式3——抽象工厂模式
,,,原创 2021-04-18 12:53:17 · 179 阅读 · 1 评论 -
设计模式2——工厂方法模式
一 、工厂方法模式的定义 工厂方法模式使用的频率非常高,在我们日常的开发中总能见到他的身影,其定义为: Define an interface for creating an object,but less subclass decide which class to instantiate Factory Method lets a class defer instantiation to subclass .(定义一个用于创建对象的接口,让子类决定实例化哪一个类,工厂方...原创 2021-04-12 00:54:59 · 74 阅读 · 0 评论 -
设计模式1——单例模式
设计模式1——单例模式 一、单例模式的定义 Ensure a class has only one instance , and provide a global point of access to it.(确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例) 二 、单例模式的应用 1 、单例模式的优点 1)由于单例模式在内存中只有一个实例,减少了内存开支,特别是一个对象需要频繁的创建,销毁时,而且创建或销毁时的性能又无法优化,单例模式...原创 2021-04-05 21:27:18 · 109 阅读 · 1 评论