This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "String & StringBuffer -- Difference" Watch "String & StringBuffer -- Difference" New topic
Author

String & StringBuffer -- Difference

Makesh Sundaresan
Greenhorn

Joined: Nov 08, 2003
Posts: 4
what is the between String & StringBuffer ?
Advance Thanx.
mira yang
Ranch Hand

Joined: Nov 08, 2003
Posts: 33
String object can not be changeed,but StringBuffer object can.
When you want to change a String object( Example: use method replace('a','b')),in fact, it create a new String Object and return it to you.
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
in other words 'String' object are immutable while 'Stringbuffer' object are mutable.


- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. <br />- What truth? <br />- That there is no spoon!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String & StringBuffer -- Difference
 
Similar Threads
byte [ ] to StringBuffer
classcastexception
How many Object is created?
StringBuffer and String returned from a method doubt
StringBuffer question