So I've watched video by Jakob Jenkov about Java synchronized keyword and blocks and methods. What it states is that:
Volatile happens before guarantee syays that any write to a field or variable that happens before write to a volatile variable are guaranteed to remain before writing to a volatole variable, so none of the instructions can be reordered to happen after the volatile variable.
Similarly any read of a variable that is read before the reads of other nonvolatile or volatile variables are guaranteed to happen before any of subsequent reads.
are these valid statements? Because i've to tried to verify this with LLM's and they are saying it's wrong.