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