Java Data Type Tutorial - Java Character.codePointBefore (CharSequence seq, int index)








Syntax

Character.codePointBefore(CharSequence seq, int index) has the following syntax.

public static int codePointBefore(CharSequence seq,   int index)

Example

In the following code shows how to use Character.codePointBefore(CharSequence seq, int index) method.

public class Main {
   public static void main(String[] args) {
      CharSequence seq = "Hello";
      int index  = 4;
//from  w  ww.ja v  a2s. c om
      int res = Character.codePointBefore(seq, index);

      String str = "Unicode code point is " + res;

      System.out.println( str );
   }
}

The code above generates the following result.