Thread thread1=new Thread(new ExtendThread(), "thread1 ");
Thread thread2=new Thread(thread1, "thread2 ");
thread1.start();
thread2.start();
thread2.start();
thread1.start(); // START
這會拋出錯誤訊息IllegalMonitorStateException
因為Thread已進入

沒有留言:
張貼留言