See section 17.5, "final Field Semantics" in
http://docs.oracle.com/javase/specs/jls/se8/jls8.pdf.
Note that a String's value field is final.
Note that a String's value field is final.
An object is considered to be completely initialized when its constructor finishes.
A thread that can only see a reference to an object after that object has been completely
initialized is guaranteed to see the correctly initialized values for that object's final fields.So to recap: this shouldn't be possible for Strings, since the value field in the String class is final and therefore has a memory barrier. But it could happen for other classes with non-final fields.