how can i round up a floating point number to the next integer value in Java? Suppose
2.1 -->3 3.001 -->4 4.5 -
2.1 -->3
3.001 -->4
4.5 -
See
float a=10.34f,b=45.678f; System.out.println((int)Math.ceil(a)); System.out.println((int)Math.ceil(b));
Output
11 46