StrictMath.floor(double a) has the following syntax.
public static double floor(double a)
In the following code shows how to use StrictMath.floor(double a) method.
//from w w w . j a v a2 s. com public class Main { public static void main(String[] args) { double d1 = 5.3 , d2 = 7.8, d3 = 1.5; System.out.println("Floor value of " + d1 + " = " + StrictMath.floor(d1)); System.out.println("Floor value of " + d2 + " = " + StrictMath.floor(d2)); System.out.println("Floor value of " + d3 + " = " + StrictMath.floor(d3)); } }
The code above generates the following result.