aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes String & StringBuffer -- Difference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic

String & StringBuffer -- Difference

Makesh Sundaresan

Joined: Nov 08, 2003
Posts: 4
what is the difference between String & StringBuffer ?
Advance Thanx.
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

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 ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link:
subject: String & StringBuffer -- Difference