Computer Applications

How are Strings different from StringBuffers ?

Java String Handling

3 Likes

Answer

The string objects of Java are immutable i.e., once created, they cannot be changed. If any change occurs in a string object, then original string remains unchanged and a new string is created with the changed string.

On the other hand, StringBuffer objects are mutable. Thus, these objects can be manipulated and modified as desired.

Answered By

3 Likes


Related Questions