toCharArray() String Example
java.lang.String class comes with toCharArray() String method to convert string to a character array. The signature is given of toCharArray() String as defined in Java API. public char[] toCharArray(): Returns a character array comprising the string characters as elements. In the following toCharArray() String is used to get a char array out of string. public …