print a letter in java

Java
    System.out.println(name.substring(1, Math.min(name.length(), 4)));
Source

Also in Java: