Java BigInteger使用

当数值超过int类型或者long类型定义得最大值得时候 可以用BigInteger这个来计算

 BigInterger add(BigInteger other) //+

 BigInterger subtract(BigInterger other)//-
 BigInterger multiply(BigInterger other)//*
 BigInterger divide(BigInterger  other)// /
 BigInterger mod(BigInterger other)// 余数
 int BigInterger compareTo(BigInterger other)//相等返回0 小于返回负数 大于返回正数
 

你可能感兴趣的:(java)