转自:http://dilegencehe.blog.163.com/blog/static/43255413201111178523181/
向上取整用Math.ceil(double a)
向下取整用Math.floor(double a)
举例:
double a=35;
double b=20;
double c = a/b;System.out.println(c); //1.75
System.out.println(Math.ceil(c)); //2.0
System.out.println(Math.floor(c)); //1.0