Online Java Compiler By
JavaTpoint.com
public class CharactercodePointBeforeMethodExample1 { public static void main(String[] args) { String str = "Welcome to java tutorials."; System.out.println("Welcome to java tutorials."); // codepoint before index 1 int res = str.codePointBefore(1); // prints character before index1 in string System.out.println("The unicode point is given as = " + res); } }
Output