diff --git "a/07.\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247/\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247.md" "b/07.\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247/\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247.md" index 6b93924..d4f3190 100644 --- "a/07.\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247/\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247.md" +++ "b/07.\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247/\344\270\211\345\244\247\346\200\247\350\264\250\346\200\273\347\273\223\357\274\232\345\216\237\345\255\220\346\200\247\343\200\201\345\217\257\350\247\201\346\200\247\344\273\245\345\217\212\346\234\211\345\272\217\346\200\247.md" @@ -78,7 +78,7 @@ synchronized语义表示锁在同一时刻只能由一个线程进行获取, public class Singleton { private Singleton() { } private volatile static Singleton instance; - public Singleton getInstance(){ + public static Singleton getInstance(){ if(instance==null){ synchronized (Singleton.class){ if(instance==null){ @@ -113,4 +113,4 @@ synchronized语义表示锁在同一时刻只能由一个线程进行获取, > 参考文献 《java并发编程的艺术》 -《深入理解java虚拟机》 \ No newline at end of file +《深入理解java虚拟机》