
数字处理类
文章平均质量分 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 · 232 阅读 · 0 评论 -
DecimalFormat格式化数字
一般情况下可以在实例化DecimalFormat对象时传递数字格式,也可以通过DecimalForma原创 2014-11-10 23:10:34 · 436 阅读 · 0 评论 -
Math类
常用数学运算方法 三角函数原创 2014-11-11 23:06:54 · 244 阅读 · 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 · 380 阅读 · 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 · 1307 阅读 · 0 评论