单例模式(懒汉式) 1. 将构造方法私有化, 不允许外边直接创建对象 2. 声明类的唯一实例, 使用private static修饰 3. 提供一个用于获取实例的方法, 使用public static修饰
This is one of the most simple way.We can also use enum class or inner calss to implement this pattern.
enen