Threads

Q1: Which cannot directly cause a thread to stop executing?

A Calling the SetPriority() method on a Thread object.

B Calling the wait() method on an object.

C Calling notify() method on an object.

D Calling read() method on an InputStream object.

ANS:C - Calling notify() method on an object.

Option C is correct. notify() - wakes up a single thread that is waiting on this object's monitor.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.