My requirement is to store the large chunk of data (String value) but i am confused which one is better to use. I only want to append the incoming data.
e.g. String str1 = "abc"
String str2 = "123";
String Str3 = "xyz";
suppose i am appending/ adding to (Sbuilder/SBuffer/ vector/ ArrayList)
one after another,
e.g. str1, str2 str3 then output must be "abc123xyz"
str2, str1,str3 output must be "123abcxyz"
Use
StringBuilderandArrayListStringBufferandVectorhave thread synchronization that adds overhead (unless you need it, but even then there’s ways to add that to the newer classes)