StringBuffer setLength(int) method sets the number of characters that can exist in the buffer. What Java API says: public synchronized void setLength(int newLength): sets the capacity for the new length of characters. If the new length specified in the method is greater than the current length, null characters (‘\u0000′) are appended so that the current […]
↧