File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes coversion of String buffer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "coversion of String buffer" Watch "coversion of String buffer" New topic
Author

coversion of String buffer

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Hi,
I want to know the syntax to convert String buffer to String...

Thanks,
angela
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
Here's an example:


A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
Antonio Lopez
Greenhorn

Joined: Feb 04, 2001
Posts: 1
The overriding method toString() in the stringbuffer class, return the encapsulated string as an instance of class String.
The code bellow shows how to do this:
1. StringBuffer sbuf=new StringBuffer("Hello");
2. String st=sbuf.toString();
Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Thanks a bunch Antonio,Frank
Angela

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: coversion of String buffer
 
Similar Threads
how to trim a StringBuffer??!!
Diff between string and string buffer
what is difference in string and string buffer
String Vs String Buffer
Searching hashmap for array String [] occurences?