delete的用法使用有误,它是用来删除部分字符的 append是用来添加字符的 public StringBuffer delete(int start, int end) Removes the characters in a substring of this sequence. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the sequence if no such character exists. If start is equal to end, no changes are made.public StringBuffer append(String str) Appends the specified string to this character sequence.
append是用来添加字符的
public StringBuffer delete(int start,
int end)
Removes the characters in a substring of this sequence. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the sequence if no such character exists. If start is equal to end, no changes are made.public StringBuffer append(String str)
Appends the specified string to this character sequence.
str.append("Java");追加字符