项目中要把十六进制字符串转化为十进制,

用到了到了Integer.parseInt(str1.trim(), 16);这个是不是后抛出java.lang.NumberFormatException异常,让老子看了半天!

后来发现是超出了int类型的取值范围,要用

BigInteger big = new BigInteger(str1.trim(),16);代替即可!!!

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-10-02
  • 2021-10-03
  • 2022-12-23
  • 2021-06-08
  • 2021-10-21
  • 2021-07-17
猜你喜欢
  • 2022-12-23
  • 2021-06-01
  • 2021-06-06
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案