Why to use StringBuffer in Java instead of the string concatenation operator
It’s better to use StringBuilder (it’s an unsynchronized version; when do you build strings in parallel?) these days, in almost every case, but here’s what happens: When you use + with two strings, it compiles code like this: String third = first + second; To something like this: StringBuilder builder = new StringBuilder( first ); … Read more