![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数字处理类
文章平均质量分 71
出道晚了
一个追求梦想的人
展开
-
高精度运算
import java.math.*;public class 高精度运算 { BigDecimal b1,b2; //加法运算 public BigDecimal add(double value1,double value2){ b1 = new BigDecimal(Double.toString(value1)); b2 = new BigDecimal(Double.to原创 2014-11-12 15:51:57 · 200 阅读 · 0 评论 -
DecimalFormat格式化数字
一般情况下可以在实例化DecimalFormat对象时传递数字格式,也可以通过DecimalForma原创 2014-11-10 23:10:34 · 370 阅读 · 0 评论 -
Math类
常用数学运算方法三角函数原创 2014-11-11 23:06:54 · 204 阅读 · 0 评论 -
大整数的加减乘除
import java.math.*;public class 大整数的加减乘除 { public static void main(String[] args) { BigInteger b = new BigInteger("4"); BigInteger b2 = new BigInteger("2"); BigInteger b3 = new BigInteger("3")原创 2014-11-12 14:49:35 · 336 阅读 · 0 评论 -
Random()方法产生随机数字,字符
public class 产生随机数{ public static int GetEvenNum(double num1,double num2){ int s = (int)num1 +(int)(Math.random() * (num2 - num1)); if (s %2 ==0){ System.out.println("随机数:" + s); return s;原创 2014-11-12 11:43:40 · 1248 阅读 · 0 评论