java.lang.Character.codePointBefore(char[ ] a, int index)


java.lang.Character.codePointBefore(char[ ] a, int index)

package com.codingdict;



import java.lang.*;



public class CharacterDemo {



   public static void main(String[] args) {



      // create a char array c and assign values

      char[] c = new char[] { 'a', 'b', 'c', 'd', 'e' };



      // create and assign value to index

      int index  = 2;



      // create an int res

      int res;



      // assign result of codePointBefore on array c at index to res

      res = Character.codePointBefore(c, index);



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



      // print res value

      System.out.println( str );

   }

}