how java handles the double and long in the 32 bit platform, I knew that java is platform independent, So how exactly it do that. My query is like for long does java stores the values as first 32 bit and another 32 bit in one and another memory location, how do we identify them ?
Yes, Java (JVM) stores / writes the first 32 bits and then the next 32 bits one after another. That's why writing to long (or say double) fields are not thread-safe (unless they are marked as volatile)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With