반응형
Math.ceil(double); //올림
Math.floor(double); //버림
Math.round(double); Math.round(flaot); //반올림
double d = 100d/8d;
System.out.println( d );
System.out.println(Math.ceil( d ));
System.out.println(Math.floor( d ));
System.out.println(Math.round( d ));
--결과--
12.5
13.0
12.0
13