java program to print character code example Example: print a letter in java System.out.println(name.substring(1, Math.min(name.length(), 4)));