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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 byCharacter.MAX_VALUEandCharacter.MIN_VALUEdo not have such a numeric value; they are not numerals. And according to the API doc: