| Author |
Cast from StringBuffer to String
|
Reggie McDougal
Ranch Hand
Joined: Sep 27, 2004
Posts: 69
|
|
How do I cast a stringBuffer to a string? Is the is right way to go? Matt
|
You can never drink too much
|
 |
Andrew Eccleston
Ranch Hand
Joined: Jul 07, 2004
Posts: 140
|
|
You will want to use the append() method of StringBuffer when adding to string data in a StringBuffer object. Then, call StringBuffer's toString() method to return the entire contents as a string value. To be honest, the biggest thing you can do to help yourself out, is to familiarize yourself with the api documentation at http://java.sun.com/j2se/1.5.0/docs/api/. The StringBuffer class is in the java.lang package (on the left side). andrew [ December 02, 2004: Message edited by: Andrew Eccleston ] [ December 02, 2004: Message edited by: Andrew Eccleston ]
|
The statement below is true.<br />-------------------------------<br />The statement above is false.
|
 |
 |
|
|
subject: Cast from StringBuffer to String
|
|
|