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