2023年7月3日
摘要: #### 问题的原因 问题代码: ``` public static void main(String[] args) { Integer sum = 0; Integer count = 0; List list = new ArrayList(Arrays.asList(1,2,3,4,5)); 阅读全文
posted @ 2023-07-03 23:41 旅途的痕迹 阅读(1899) 评论(0) 推荐(0) 编辑
摘要: #### 单例模式的定义 Ensure a class has only one instance, and provide a global point of access to it.(确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。) 单例模式的通用类图如下: ![](htt 阅读全文
posted @ 2023-07-03 00:16 旅途的痕迹 阅读(10) 评论(0) 推荐(0) 编辑