标签:mat block gen 分享 result 资源 stat round public
os :windows7 x64
jdk:jdk-8u131-windows-x64
ide:Eclipse Oxygen Release (4.7.0)
code:
package jizuiku1;
public class Demo001 {
public static void main(String[] args) {
//Math.round 简单的四舍五入。还有一种四舍五入是 科学计算中的四舍六入五凑偶 规则复杂。
//在大学中进行实验数据处理时,要用后者!
System.out.println(Math.round(12.49));
System.out.println(Math.round(12.51));
System.out.println();
System.out.println(Math.round(13.50));
System.out.println(Math.round(12.50));
}
}
result:
Java优秀,值得学习。
学习资源:API手册+Java源码+清净的心地。
JavaSE8基础 Math.round 简单的四舍五入成整数
标签:mat block gen 分享 result 资源 stat round public
原文地址:http://www.cnblogs.com/jizuiku/p/7513564.html