public static double floor(double a)
double a = 12.6; double b = Math.floor(a); System.out.println(b);
double c = 8.3; double d = Math.floor(c); System.out.println(d);Output: 8.0 In this example, we use the Math.floor function to return the largest integer less than or equal to 8.3, which is 8. The Math.floor function is part of the java.lang package library in Java.