String word = "Google"; for (char c: word.toCharArray()) { System.out.print(c + "-"); } // Outputs: G-o-o-g-l-e