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