Is String s = \"foobar\"; atomic?
String s = \"foobar\";
Assigning a object-reference should be, but I\'m no really sure.
Thanks.
Yes, but if you're worried about race conditions, you should at least be aware of 'synchronized' methods/blocks.
And note that this is not atomic because it contains two operations:
String s = string_a + string_b;