ceil function java code example
Example 1: java ceil
double num = 4.333;
int round_up = Math.ceil(num); //round up
//Console will return: round_up will be 5
int round_down = Math.floor(num); //round down
//Console will return: round_up will be 4
Example 2: ceil function in java
import java.lang.Math;
Math.ceil(a);