java Long的iniValue出错

Long l1 = 2500000000L;

l1.intValue() 的值是负数

这里

System.out.println(Integer.MAX_VALUE);

// 2147483647最大

溢出导致这个错误。

这里要用

l1.longValue();

原文地址:https://www.cnblogs.com/gmq-sh/p/4635864.html