/* OUTPUT: h,e,l,l,o */ // Fencepost solution to printing a String with commas // between the letters. public class Fence { public static void main(String[] args) { String s = "hello"; System.out.print(s.charAt(0)); for (int i = 1; i < s.length(); i++) { System.out.print("," + s.charAt(i)); } System.out.println(); } }