The java string toCharArray() method converts the given string into a sequence of characters. The returned array length is equal to the length of the string.
public char toCharArray() Return : It returns a newly allocated character array.
G e e k s f o r G e e k s
- CharArrayWriter toCharArray() method in Java with examples
- Convert a List of String to a comma separated String in Java
- Convert a Set of String to a comma separated String in Java
- Convert an ArrayList of String to a String array in Java
- Convert Set of String to Array of String in Java
- String Literal Vs String Object in Java
- Insert a String into another String in Java
- Java.lang.string.replace() method in Java
- Java.lang.String.matches() in Java
- Java.lang.String.replace() in Java
- Java.lang.String class in Java | Set 2
- Java.lang.String.getByte() in Java
- Java.lang.String.startswith() in Java
- Java.lang.String.copyValueOf() in Java
- Java String indexOf()
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.