What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?
StringBuffer
StringBuilder
StringBuilder (introduced in Java 5) is identical to StringBuffer, except its methods are not synchronized. This means it has better performance than the latter, but the drawback is that it is not thread-safe.
Read tutorial for more details.