Online Java Compiler By
JavaTpoint.com
public class CharactercodePointBeforeMethodExample8 { public static void main(String[] args) { System.out.println("The string is: Java"); CharSequence seq1 = "Hello"; int index1 = 4; int res1 = Character.codePointBefore(seq1, index1); String str1 = "The Unicode code point for Java is " + res1; System.out.println( str1 ); System.out.println("The numbers are: '1', '2', '3', '4'"); char[] ch2 = new char[] { '1', '2', '3', '4'}; int index2 = 3; int res2 = Character.codePointBefore(ch2, index2); String str2 = "The unicode code point for numbers is " + res1; System.out.println(str2 ); } }
Output