一、BigInteger
1.创建
BigInteger a
=new BigInteger("123");
BigInteger b
=new BigInteger("456");
BigInteger a
=BigInteger
.valueOf("123");
BigInteger a
=BigInteger
.valueOf(123);
a
=BigInteger
.ZERO
;
a
=BigInteger
.ONE
;
a
=BigInteger
.TEN
;
2.运算
比较
a
.compareTo(b
) == 0
a
.compareTo(b
) > 0
a
.compareTo(b
) < 0
加法
a
.add(b
)
减法
a
.subtract(b
)
乘法
a
.multiply(b
)
除法
a
.devide(b
)
取余
a
.remainder(b
)
绝对值
a
.abs()
取反
a
.negate()
幂
a
.pow(3)
转载请注明原文地址:https://tech.qufami.com/read-15867.html