java delete char at

deleteCharAt() StringBuffer Example

To manipulate string, java.lang.StringBuffer class comes with many methods, otherwise which will take long laborious coding as in C/C++. One such method is deleteCharAt() StringBufferthat deletes a single character. What Java API says about deleteCharAt() StringBuffer: public synchronized java.lang.StringBuffer deleteCharAt(int index1): Deletes a single character from buffer at index number…