If I have code like this -
long x;
x = 0xFFFFFFFFL;
If i run this code on a 32 bit machine is it guaranteed to be atomic or is it po
Section 8.4 of the Java Virtual Machine specification states that a double or long that is not declared volatile is treated as two 32-bit variables for load, store, read and write operations.
Furthermore, the manner of encoding and the order of the two 32-bit operations is not defined.
The spec does encourage implementations to make the operation atomic but they do not require it.