1How to convert string to array
2
3import java.util.*;
4
5public class GFG {
6
7 public static void main(String args[])
8 {
9
10 String str = "GeeksForGeeks";
11
12 // Creating array and Storing the array
13 // returned by toCharArray()
14 char[] ch = str.toCharArray();
15
16 // Printing array
17 for (char c : ch) {
18 System.out.println(c);
19 }
20 }
21}
22