java.lang.Character.getNumericValue(int codePoint)


java.lang.Character.getNumericValue(int codePoint)

package com.codingdict;



import java.lang.*;



public class CharacterDemo {



   public static void main(String[] args) {



      // create 2 int primitives cp1, cp2

      int cp1, cp2;



      // assign values to cp1, cp2

      cp1 = 0x0068;

      cp2 = 0xff30;



      // create 2 int primitives i1, i2

      int i1, i2;



      // assign numeric values of cp1, cp2 to i1, i2

      i1 = Character.getNumericValue(cp1);

      i2 = Character.getNumericValue(cp2);



      String str1 = "Numeric value of code point cp1 is " + i1;

      String str2 = "Numeric value of code point cp2 is " + i2;



      // print i1, i2 values

      System.out.println( str1 );

      System.out.println( str2 );

   }

}