Java
Shared variables are accessed from within synchronized methods.
Java programs execute synchronized methods in a mutually exclusive way generating a critical section (misleadingly called monitor).
However, notify and wait operations must be explicitly invoked within such sections, rather than being automatically associated with entry and exit.
Java does not provides any mechanism for deadlock detection or prevention!