Math.Floor In Java Example
Chapter:
Math Class
Last Updated:
14-06-2016 15:39:45 UTC
Program:
/* ............... START ............... */
public class JavaMathFloorExample {
public static void main(String args[]) {
double i = 20.8;
System.out.println("Given Number : " + i);
System.out.println("Largest Integer not greater than the number : " + Math.floor(i));
}
}
/* ............... END ............... */
Output
Given Number : 20.8
Largest Integer not greater than the number : 20.0
Tags
Math.Floor, Java, Math