線程安全---在方法前加synchronized

測試一:方法前未加synchronized  線程不安全 package thread; public class MyThread extends Thread { private int count = 5; public void run() { count--; System.out.println(this.currentThread().getName() + " count= " +
相關文章
相關標籤/搜索