Java math.round
public class Testc {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(Math.round(0.5));
System.out.println(Math.round(1.5));
System.out.println(Math.round(2.5));
System.out.println(Math.round(3.5));
System.out.println(Math.round(0.3));
System.out.println(Math.round(0.9));
System.out.println(Math.round(6.5));
}
}
补充:软件开发 , Java ,