round up double java code example
Example 1: double round java integer
int a = (int) Math.round(doubleVar);
Example 2: how to round up in java
int x = 3.14;
Math.round(x);
//Rounds to nearest int
Math.ceil(x);
//Rounds up to int
Math.floor(x);
//Rounds down to int