比较这两道题,请高手解答
eshow 2004-02-05 07:24:49 55. Which two CANNOT directly cause a thread to stop executing? (Choose Two) (A,E)
A. Calling the yield method
B. Calling the wait method on an object
C. Calling the notify method on an object
D. Calling the NotifyAll method on an object
E. Calling the start method on another Thread object
60. Which two CANNOT directly cause a thread to stop executing? (Choose Two) (A,C)
A.Existing from a synchronized block
B.Calling the wait method on an object
C.Calling notify method on an object
D.Calling read method on an InputStream object
E.Calling the SetPriority method on a Thread object
以上分别是147题中的55题和60题。题干一样,都是能直接停止一个线程运行的是。但一题选了notify一题没选。是不是矛盾啊?请高手详细解答一下各个选项,这个概念我好象很混淆,谢谢了!
其中我能确定的应该是yield,wait,read可以造成当前线程停止,其他的我觉得都不能直接造成线程停止啊!可偏偏答案还选了yiled。notify 和notifyALL应该是唤醒线程的啊!怎么答案又没有选呢??