This stupid multi-thread code isn’t working. I hate Java!
Let me step in here. Java is probably the most deterministic language ever. But reading the Java Memory Model specification is not exactly a walk in the park. Fortunately, I have a trick. Let’s have a look together.