Below are the 2 questions regarding
thread, and in parentheses are the standard answers provide to me:
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
You should note that the question is the same but the items for choosing are different. Also you should note that the "notify" was chosen as answer in the latter but not in the former! This is so strange and conflict and I cannot understand!
According my knowledge, I think yield(), wait() and read()(I/O block) could cause a thread to stop directly, but notify() and notifyAll() should wake a thread up and start() is the method let the method run! But the above answers frustrate me! Maybe I'm confusing regarding this conception, would you pls help me and give me the detailed and clear explanation for each item enumerated above? Are there some errors in standard answers?
Thank you very much!