Sometimes, it may be needed to copy a few characters of string content of StringBuffer to an array or to copy the complete StringBuffer into an array. Here, getChars() method comes into usage. What Java API says: public synchronized void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin): Copies a few characters from the StringBuffer […]
↧