Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

String & StringBuffer -- Difference

 
Makesh Sundaresan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
what is the difference between String & StringBuffer ?
Advance Thanx.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
In a nutshell -- Strings are immutable (cannot be changed once they are created) whereas StringBuffers are mutable(can be changed and manipulated after they are created).
Check out the API for String and StringBuffer for more detail about each of the classes.

Closing this duplicate -- please reply in the original thread here.
[ November 09, 2003: Message edited by: Jessica Sant ]
 
    Bookmark Topic Watch Topic
  • New Topic