1// String toCharArray() method example or string to char array java
2public class StringToCharArrayDemo
3{
4 public static void main(String[] args)
5 {
6 String strInput = new String("Flower Brackets");
7 // using toCharArray() method java
8 char[] chArray = strInput.toCharArray();
9 System.out.println("Character array: ");
10 for(char ch : chArray)
11 {
12 System.out.println(ch);
13 }
14 }
15}