The method
toCharArray() is used to convert any String into array of characters.
The format of
toCharArray is:char[] toCharArray() This method will convert the invoking string object into a character array of same length as of the invoking string and returns it. The following example demonstrates toCharArray:
StringtoCharArray CODE class ToCharDemo OUTPUT Hyderabad DESCRIPTION The first output line is just the display of THINGS TO TRY
Dependent Topics :
|