Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
    Bookmark Topic Watch Topic
  • New Topic

String & StringBuffer -- Difference  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
what is the difference between String & StringBuffer ?
Advance Thanx.
 
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 ]
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!