aspose file tools*
The moose likes Beginning Java and the fly likes reg: string and stringbuffer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "reg: string and stringbuffer" Watch "reg: string and stringbuffer" New topic
Author

reg: string and stringbuffer

sri charan
Greenhorn

Joined: Dec 04, 2007
Posts: 14
Hello friends,

I just want to know if the "stringbuffer" is giving more flexibuility for data store then why in most case's we go for "string"

can any one please confirm this......
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Don't use StringBuffer any more; use StringBuilder.

String is used because its objects are immutable, so they can be reused without using too much memory, or threading problems.

StringBuilder is used because it gives a fast way of altering the contents of String-like text.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reg: string and stringbuffer
 
Similar Threads
StringBuffer question
classcastexception
byte [ ] to StringBuffer
How many Object is created?
StringBuffer and String returned from a method doubt