public static void main(String[] args) {BigInteger bg1 = new BigInteger("12345678912");// int类型转BigIntegerint value = 12345678912;BigInteger bg2 = BigInteger.valueOf(value);//1.加法System.out.println(bg1.add(bg2));//2.减法System.out.println(bg1.subtract(bg2));//3.乘法System.out.println(bg1.multiply(bg2));//4.除法System.out.println(bg2.divide(bg1));System.out.println("--------------");//5.取除数和余数的数组BigInteger[] bg_arry = bg2.divideAndRemainder(bg1);for(int i=0; i< bg_arry.length; i++) {System.out.println(bg_arry[i]);}}