Check out example codes for "java round up". It will help you in understanding the concepts better.

Code Example 1

double test = 0.01;
// rounds up to the next INTEGER
test = Math.ceil(test);  // 1.0


double test2 = 1.0;
// does not round if decimal is 0
test2 = Math.ceil(test2);  // 1.0

Learn ReactJs, React Native from akashmittal.com