Java StrictMath.ceil(double a)
Syntax
StrictMath.ceil(double a) has the following syntax.
public static double ceil(double a)
Example
In the following code shows how to use StrictMath.ceil(double a) method.
public class Main {
/* w w w . ja va 2s . c o m*/
public static void main(String[] args) {
double d1 = 1.2 , d2 = 3.4, d3 = 6.5;
System.out.println("Ceil value of " + d1 + " = " + StrictMath.ceil(d1));
System.out.println("Ceil value of " + d2 + " = " + StrictMath.ceil(d2));
System.out.println("Ceil value of " + d3 + " = " + StrictMath.ceil(d3));
}
}
The code above generates the following result.