java中大数用法

来源:互联网 发布:mimo软件 编辑:程序博客网 时间:2024/06/06 01:19

java中大数包含在java.math.*中

有大整数 大浮点数 理论上可以表示正负无穷大的数
BigInteger 大整数
BigDecimal 大浮点数

声明函数:BigInteger bi = new BigIneger(“100”);
BigDecimal bd = new BigDecimal(“100”);