摘要:
1 public class MyThread extends Thread { 2 public static int i=0; 3 4 public static synchronized void test(int x){ 5 System.out.println(i+"::::"); 6 i=x+i; 7 } 8 9 public void run(){10 //the method is overwritten 11 // int i=0;12 whil... 阅读全文