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
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.