Home / Questions / What is the difference between StringBuffer and StringBuilder class?
Explanatory Question

What is the difference between StringBuffer and StringBuilder class?

👁 770 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Use StringBuilder whenever possible because it is faster than StringBuffer. But, if thread safety is necessary then use StringBuffer objects.