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