Java Programming and Web Technologies Quiz
Casual Mode - Take your time!
1 / 6
Correct
0
Incorrect
0
Score
0%
Multiple Choice
A monitor called nik has 3 threads, having same priority, in its waiting pool; How can we notify one of the threads, named 'thread1' to move from Waiting state to Ready
- Execute notify(thread1); from within synchronized code of mon.
- Execute mon.notify(thread1); from synchronized code of any object.
- Execute thread1.notify(); from synchronized code of any object.
- Execute thread1.notify(); from any code(synchronized or not) of any object.
- You cannot specify which thread will get notified.