image.png
    第一个if是为了减少synchronized的锁的范围而写的。
    第二个if是多个线程竞争Singleton这个类,如果instance为空,我们创建一个实例
    image.png