In Java, what do wait and notify do inside a synchronized block? | Process Synchronization question · AnyPrep