String name = "John"; System.out.println(name.charAt(2)); // prints character 'h' to terminal
System.out.println(name.substring(1, Math.min(name.length(), 4)));