Java String toCharArray():
The java string toCharArray() method converts this string into character array. It returns a newly created character array, its length is similar to this string and its contents are initialized with the characters of this string.
Returns a newly allocated character array whose length is the length of this string and whose contents are initialized to contain the character sequence represented by this string.
Syntax:
public char[] toCharArray()