rounding java double code example
Example 1: double round java integer
int a = (int) Math.round(doubleVar);
Example 2: java get int from double without rounding
int value = (int) 6.14; // 6
int score = (int) 6.99; // 6
int a = (int) Math.round(doubleVar);
int value = (int) 6.14; // 6
int score = (int) 6.99; // 6