转StringBuffer
StringBuffer buffer = new StringBuffer(string);
转String
String string = buffer.toString();
和StringBuffer的区别
string不可直接反转,不可更改
stringbuffer可以直接反转 ()
StringBuffer buffer = new StringBuffer(string);
String string = buffer.toString();
string不可直接反转,不可更改
stringbuffer可以直接反转 ()