Online Java Compiler By
JavaTpoint.com
public class CharactercodePointBeforeMethodExample9 { public static void main(String[] args) { System.out.println("The numbers are: '1', '2', '3', '4':"); char[] ch1 = new char[] { '1', '2', '3', '4'}; int index1 = 3; int res1 = Character.codePointBefore(ch1, index1); String str1 = "The unicode code point for first four numbers is " + res1; System.out.println(str1 ); System.out.println("The numbers are: '1', '2', '3', '4':"); char[] ch2 = new char[] { '5', '6', '7', '8'}; int index2 = 3; int res2 = Character.codePointBefore(ch2, index2); String str2 = "The unicode code point for second four numbers is " + res2; System.out.println(str2 ); } }
Output