Online Java Compiler By
JavaTpoint.com
public class CharactercodePointBeforeMethodExample5 { public static void main(String[] args) { char[] ch1 = new char[] { 'A', 'B', 'C', 'D'}; int index1 = 3, start1 = 1; int res1 = Character.codePointBefore(ch1, index1, start1); System.out.println("Welcome to our tutorial site."); System.out.println("The unicode code point for alphabets:"); String str1 = "The unicode code point is " + res1; System.out.println(str1 ); char[] ch2 = new char[] { '1', '2', '3', '4'}; int index2 = 3, start2 = 1; int res2 = Character.codePointBefore(ch2, index2, start2); System.out.println("The unicode code point for numbers:"); String str2 = "The unicode code point is " + res2; System.out.println(str2 ); } }
Output