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

Code Example 1

Math.round(y)

Code Example 2

import java.lang.Math; 
double num1 = 74.65;
System.out.println(Math.round(num1));

Learn ReactJs, React Native from akashmittal.com