大数运算法则

public static void main(String[] args) { 


        BigInteger aa =new BigInteger("100");


        BigInteger bb= new BigInteger("25"); 


        BigInteger sub=aa.subtract(bb);//大整数的减


        BigInteger add=aa.add(bb);//大整数的加 


        BigInteger mul=aa.multiply(bb);//大整数的乘


        BigInteger div=aa.divide(bb);//大整数的除 


        System.out.println(sub.toString()); 
        System.out.println(add.toString());
        System.out.println(mul.toString());
        System.out.println(div.toString()); }

你可能感兴趣的:(大数运算法则)