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

测试一:方法前未加synchronized  线程不安全 package thread; public class MyThread extends Thread { private int count = 5; public void run() { count--; System.out.println(this.currentThread().getName() + " count= " +
相关文章
相关标签/搜索