Which of the following will definitely stop a
thread from executing:
wait()
notify()
yield()
suspend()
sleep()
the answer given is a,c,d,e
but how come c. if there is no other thread then it wont stop the thread .. and the resoning given was
Only notify() will not explicitly stop an executing thread from running. Yield() returns control back to the JVM, which may or may not stop the thread from running. ( so its no definite )
if the Q was whcih of the following can stop the thread then yield() is one of the answer ..
correct me if i am wrong ..
anil