String str = "sdfghjk"; char[] char1 = str.toCharArray(); for (char c : char1) { System.out.println(c); }