String String is immutable ( as soon as created can not be changed )item . The item created as a String is saved inside the constant string pool. Each immutable object in java is thread secure ,that means string is also thread safe . String Cannot be...

Markdown supported · ⌘↵ to post
Shai Almog
Yak Barber, duck whisperer, hunter of bugs, feeder of dogs, heap climber, stack explorer and rider of shells
When you do
String s = "A" + otherString;javac produces
StringBuilderunder the hood. Prior to JDK 1.5 it producedStringBufferwhich was a major source of performance overhead in Java.