Home / Questions / Differentiate between String and StringBuffer objects.
Explanatory Question

Differentiate between String and StringBuffer objects.

👁 20 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

The string objects of Java are immutable. If any change occurs in a string object, the original string remains unchanged and a new string is created with the changed string. StringBuffer objects are mutable, meaning these objects can be manipulated and modified as desired.