educative.io

Question about example 2 in "reordering effects" chapter

Hello!
In second example we consider such 5th step:

int read4 = read3.x; is executed by thread1 and read4 is set to 3.
While on the 2d step there is read3 = obj2.
obj2.x or read3 are nowhere changed so how is it possible that read4 becomes 3? I’m sure that read4 stays 0.


Course: https://www.educative.io/courses/java-multithreading-for-senior-engineering-interviews
Lesson: Reordering Effects - Java Multithreading for Senior Engineering Interviews