how to convert string to stringbuffer code example Example: convert stringbuffer to string in java str.toString();