package javaapplication1;
public class JavaApplication1 {
public static void main(String[] args) {
String s = "Java Programming";
// the codepoint before index 2
int cp = s.codePointBefore(2); // codePointBefore(char[] a, int index)
System.out.println(cp);
// the codepoint before index 6
System.out.println(s.codePointBefore(6));
}
}
/*
run:
97
80
*/