- 题目描述
- 解题思路
- 代码详解
- 运行截图
题目:为了弥补虚拟机在高精度计算的不足,JAVA提供了BigInteger类,用来支持任何精度的整数计算。
实现:用BigInteger四则运算
解题思路创建类 Question49
使用 BigInteger 类的求加法:add 方法
使用 BigInteger 类的求减法:subtract 方法
使用 BigInteger 类的求乘法:multiply 方法
使用 BigInteger 类的求除法:divide方法
代码详解package question; import java.math.BigInteger



