强制类型转换 有可能会丢失一些数据 double a=9.99999; int ab=(int)a; 如果想对浮点数进行舍入运算,则需使用Math.round方法 double a=9.9999; int ab=(int)Math.round(a);