Java Interview Questions
What is the difference between StringBuilder and StringBuffer classes?
StringBuffer class is synchronized and StringBuilder is not. When the programmer wants to use several threads, he should use StringBuffer as it gives reliable results. If only one thread is used, StringBuilder is preferred, as it improves execution time.