1 | void notify() |
2 |
void notifyAll()
|
3 | notify() notifies the thread associated with the given synchronization object that has been waiting the longest time |
4 | notifyAll() notifies all threads associated with the given object and is therefore safer than notify() |
5 | One can mark a variable as "threadsafe" to inform the compiler that only one thread will be modifying this variable. |