1The ceiling of a floating point number is the smallest integer that is >= to the number.
1import java.lang.*;
2
3public class Math {
4
5 public static void main(String[] args) {
6
7 // get two double numbers
8 double x = 125.9;
9 double y = 0.4873;
10
11 // call ceal for these these numbers
12 System.out.println("Math.ceil(" + x + ")=" + Math.ceil(x));
13 System.out.println("Math.ceil(" + y + ")=" + Math.ceil(y));
14 System.out.println("Math.ceil(-0.65)=" + Math.ceil(-0.65));
15 }
16}