Skip to content

Instantly share code, notes, and snippets.

View gravity182's full-sized avatar
🎯
Focusing

Dmitry gravity182

🎯
Focusing
View GitHub Profile
public class JmmVolatileConditionRead {
private static int x;
private static volatile boolean initialized;
public static void writer() {
x = 5; /* W1 */
initialized = true; /* W2 */
}