The
getChars() method copies characters from the string into the destination character array.
Syntax of
getChars() method is:public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) This method copies characters from index srcBegin to (srcEnd - 1) to the subarray of dst starting at the index dstBegin . The number of characters that are copied to the character array is given by (srcEnd - srcBegin) .
Here is a code snippet which demonstrates this method: StringgetChars CODE class StringGetCharsDemo OUTPUT dest array contents: orious DESCRIPTION At THINGS TO TRY
Dependent Topics :
|