How to remove some characters from a StringBuffer?
The example below show you to remove some elements of the
StringBuffer. We can use the
remove(int start, int end) method call to remove some characters from the specified
start index to end
end index. We can also remove a character at the specified index using the
deleteCharAt(int index) method call.
Output of the program is:
Original text = Learn Java Programming by Examples
After deletion = Programming by Examples
Final result = Programming by Example