long型也是一样的报错,不知道为什么?

解决方案 »

  1.   

    用BigInteger
    例子:
    import java.math.BigInteger;public final class Hello {
        public static void main(String[] args) {
            BigInteger temp = new BigInteger("2147483649");
            System.out.println(temp);
        }
    }
      

  2.   

    等等,刚才没看清位数,不用BigInteger的,用long就可以了。
        public static void main(String[] args) {
            long temp = 2147483649L;
            System.out.println(temp);
        }
    看到214783649后面的L了没有?
      

  3.   

    int型的最大值是2147483648,
    你用long型肯定不会错的