如何在Java中连接大整数?

use*_*930 1 java numberformatexception

我试图编写一个简单的程序,它将生成随机的3个整数,然后将它们放在数组中,然后将它们连接成一个整数序列,但它会抛出一个错误

这是代码:

int [] kol=new int[3];

for(int j=0;j<3;j++) {
    kol[j]=(int)Math.round(Math.random() * 89999) + 10000;              
    System.out.print(kol[j] +"\n" );                
}

String ma=kol[0]+","+kol[1]+","+kol[2]+";";
System.out.println(ma);
Run Code Online (Sandbox Code Playgroud)

我也尝试过:

int b = Integer.parseInt(Integer.toString(kol[0]) + Integer.toString(kol[1]) +
    Integer.toString(kol[2]));
System.out.println(b);
Run Code Online (Sandbox Code Playgroud)

但同样的错误:

Exception in thread "main" java.lang.NumberFormatException: For input 
at java.lang.NumberFormatException.forInputString(Unknown Source)
string: "715534907077099"
Run Code Online (Sandbox Code Playgroud)

Sho*_*ate 6

整数范围不足以获得较大的值.

int MAX_VALUE = 2147483647
int MIN_VALUE = -2147483648
Run Code Online (Sandbox Code Playgroud)

因此,而不是使用java.math.BigInteger中的相同