System.out.println(Integer.parseInt("7FFFFFFF",16)); //this is ok.
System.out.println(Integer.parseInt("FFFFFFFF",16)); //this throws Exception
System.out.println(Integer.valueOf("FFFFFFFF",16)); //this throws Exception
当我尝试使用parseInt或valueOf方法将十六进制数转换为整数类型,负数时,该方法将为负数抛出NumberFormatException。我在任何地方都找不到答案。