What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?
StringBuffer
StringBuilder
StringBuilder is not thread safe. String Buffer is. More info here.
EDIT: As for performance , after hotspot kicks in , StringBuilder is the winner. However , for small iterations , the performance difference is negligible.