Do for each work on strings code example Example: java foreach char for (char ch: "xyz".toCharArray()) { System.out.println(ch); }