print a character in java code example
Example 1: print a letter in java
System.out.println(name.substring(1, Math.min(name.length(), 4)));
Example 2: print character in string java
String name = "John";
System.out.println(name.charAt(2));
// prints character 'h' to terminal