Problem Statement
What does the synchronized keyword guarantee?
Explanation
Entering a synchronized block acquires the monitor; exiting establishes a happens-before edge that flushes writes to main memory. It ensures mutual exclusion and visibility but not fairness.
