Java tutorial
public class Main { public static void main(String[] args) { String str = "java2s.com"; System.out.println("String = " + str); // codepoint before index 1 i.e j int retval = str.codePointBefore(1); // prints character before index1 in string System.out.println("Character(unicode point) = " + retval); } }