- 博客(2)
- 收藏
- 关注
转载 JAVA基础]在Java中确定浮点数的精度,确定小数点后面的数字个数!
简单方法 精确到两位小数; double d=((int)(d*100))/100; 三位小数吗。 double d=((int)(d*1000))/1000; 如果int不够的话,用long. 简单方法2import java.text.*; public class number {
2008-06-13 13:44:00
1244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人