(java Math类中提供了三个与取整有关的方法) ceil,floor,round ceil ceil,该方法就表示向上取整,Math.ceil(11.3)的结果为12,Math.ceil(-11.6)的结果为-11;Math.ceil(-11)的结果为-11; floor floor,该方法就表示向下取整,Math.floor(11.6)的结果是11,Math.floor(-11.4)的结果-12;Math.floor(-11)的结果-11; round Math.round()是先加0.5,然后再向下取整。Math.round(-11.6)=>Math.floor(-11.1)的结果-12;