摘要:
// *****************************现象描述******************************* package com.example.SpringBootTest1.shejimoshi.singleton;public class InnerclassSi 阅读全文
摘要:
public enum EnumSingleton { INSTANCE;} public class Test { public static void main(String[] args) { EnumSingleton instance1 = EnumSingleton.INSTANCE; 阅读全文
摘要:
/** * 建造者 */public abstract class Builder { public abstract Builder buildA(String s); public abstract Builder buildB(String s); public abstract Builde 阅读全文
摘要:
对象适配器模式(组合模式) public class AdapterTest { public static void main(String[] args) { Target target = new Adapter(new Adaptee()); target.output5v(); }}cla 阅读全文