Java.lang.Character.codePointAt() 方法


Java.lang.Character.codePointAt() 方法

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' };



      // craete 2 int's res, index and assign value to index

      int res, index  = 0;



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

      res = Character.codePointAt(c, index);



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



      // print res value

      System.out.println( str );

   }

}