✏️ Explanatory Question

Differentiate between String and StringBuffer objects.

👁 24 Views
📘 Detailed Answer
🟢 Easy
💡

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.