四则运算(add(加)、subtract(减)、multiply(乘)、divide(除)、remainder(余))
代码如下:
public class TestBigInteger {
public static void main(String[] args) {
// TODO Auto-generated method stub
BigInteger big1 = new BigInteger("100");
BigInteger big2 = new BigInteger("10");
System.out.println(big1.add(big2));//+
System.out.println(big1.subtract(big2));//-
System.out.println(big1.multiply(big2));//*
System.out.println(big1.divide(big2));//÷
System.out.println(big1.remainder(big2));//%
}
}