1、类型转换,double->Double->四舍五入->long->Long->int
double d= scanner.nextDouble(); Double dd = (Double)d; long i = Math.round(dd); Long i1 = (Long)i; int i2 = i1.intvalue();