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 setCharAt(int, char) that replaces a single character in the string buffer. What Java API says: public synchronized void setCharAt(int index1, char1): Replaces the character in the StringBuffer at index number index1 with […]
↧