- The size of
int
is 32 bits andlong
/double
are 64 bits. Will these sizes remain same on- 32/64 bit JVM
- 32/64 bit processors
- if yes then will the operations on
long
/double
be atomic on a 64 bit processor/JVM?
The Oracle Java tutorial says:
Reads and writes are atomic for reference variables and for most primitive variables (all types except long and double).
Does this statement has anything to do with jvm/processor architecture? Can someone please explain.
3. Finally will i be able to make read/write of double/long atomic if i use 64 bit jvm and processor