Which of the following will definitely stop a
thread from executing:
A. wait()
B. notify()
C. yield()
D. suspend()
E. sleep()
The answer was A, C, D, and E.
I answered A.D, and E. Does yield() really cause the thread to stop executing? I thought that it would only stop executing if the JVM chose to stop it.
Thanks.
P.S. I looked at another thread topic concerning this (which I can't find now) and I looked at several links of threads, but none seemed conclusive to me on this point.