Java Character.getNumericValue(int codePoint)
Syntax
Character.getNumericValue(int codePoint) has the following syntax.
public static int getNumericValue(int codePoint)
Example
In the following code shows how to use Character.getNumericValue(int codePoint) method.
/*ww w. ja v a 2 s . co m*/
public class Main {
public static void main(String[] args) {
int cp1 = 88, cp2 = 0x0f30;
int i1 = Character.getNumericValue(cp1);
int 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 );
}
}
The code above generates the following result.