8 replies
freddye
over 13 years ago

"The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations. In String manipulation code, character strings are routinely concatenated. Using the String class, concatenations are typically performed as follows: String str = new String (""Stanford ""); str += ""Lost!!""; "
karthur
over 13 years ago

"Chain is utilized to govern persona string section that can't possibly be modified (study-solely as well as changeless). StringBuffer is needed to symbolize heroes that could be changed. Overall performance sensible, StringBuffer will be quicker while acting concatenations. It is because whenever you concatenate A String, you are making a completely new thing (internally) when since Chain is definitely immutable."
to see other 6 answers
Related documents
Search questions by subject
