🎴 Flashcard Mode

Java Programming and Web Technologies Quiz

Card1 / 6
Mastered0
Review0
QuestionClick to flip

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

AnswerClick to flip back
A
You cannot specify which thread will get notified.
💡 Explanation:

When multiple threads are waiting on a monitor with the same priority, Java's notify() method wakes up one thread but does not specify which one. The thread scheduler determines which thread actually gets notified.

Change Mode