← Back to Javanotify() vs notifyAll()
Javajava
The Question
What is the difference between notify() and notifyAll() in Java?
What a Strong Answer Covers
- notify() wakes one waiting thread arbitrary
- notifyAll() wakes all waiting threads
- notify() can cause starvation
- notifyAll() safer for multiple conditions
- both require synchronized context
Related Questions
Practice This Question
Get AI-graded feedback on your answer with follow-up probes on weak points.
Take the Free Assessment