1
JavaAdvanced#spring
Defines how threads interact through memory: visibility, ordering, happens-before relationships. Provides guarantees for volatile, synchronized, and final fields.
volatile boolean flag = false;
// Thread A: data = 42; flag = true;
// Thread B: if (flag) { read data; } // happens-before guarantees B sees data=42