Search posts, tags, users, and pages
Preeti Math
IT operations @ Amazon
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...
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;
String s = "A" + otherString;
javac produces StringBuilder under the hood. Prior to JDK 1.5 it produced StringBuffer which was a major source of performance overhead in Java.
StringBuilder
StringBuffer
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.