Character.getNumericValue() issue
char, character, java
Solution
`getNumericValue()` will convert characters that actually represent numbers (like the "normal" digits 0-9, but also numerals in other scripts) to their numeric value. The Characters represented by `Character.MAX_VALUE`and `Character.MIN_VALUE` do not have such a numeric value; they are not numerals. And according to the API doc:
If the character does not have a numeric value, then -1 is returned.
Problem
I'm probably missing something, but why are the two numeric values equal to `-1`? ``` System.out.println(Character.getNumericValue(Character.MAX_VALUE)); System.out.println(Character.getNumericValue(Character.MIN_VALUE)); ``` Returns: ``` -1 -1 ```