In thread synchronization, what is the main difference between notify and notifyAll methods?
notify
notifyAll
notify can wake up multiple threads, while notifyAll can only wake up one
notify wakes up the highest-priority thread, while notifyAll wakes up all threads
There is no difference; they are synonymous
notify wakes up a single thread, while notifyAll wakes up all waiting threads