This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

String & StringBuffer -- Difference

Makesh Sundaresan
Greenhorn

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

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: http://aspose.com/file-tools
 
subject: String & StringBuffer -- Difference