Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Size of java primitives on 32/64 bit jvm?

921065Mar 1 2012 — edited Mar 1 2012
The size of int is 32 bits and long/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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2012
Added on Mar 1 2012
2 comments
482 views