04 2019 档案
摘要:P1001 A+B Format 原题 Calculate a+b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless t
阅读全文
摘要:一个简单的pat题目p1005
阅读全文
摘要:核心作用:保证一个类只有一个实例,并提供一个访问该实例的全局访问点 实现思路:懒汉式、饿汉式、双重检测锁、内部类式、枚举式 懒汉式:直接声明一个私有的静态类成员,然后将其构造器私有化 优点:线程安全,调用效率高 缺点:不能实现预加载 实现过程: 饿汉式:只是声明一个私有的静态类,但不进行初始化,第一
阅读全文