Find out floor value of a number using math.floor method of math class
Previous | Home | Next |
This program shows how the floor value of number comes using Math.floor method
Math.floor method of math class returns the value of number nearest to it lower one neglecting value after decimal.
Math.floor method of math class returns the value of number nearest to it lower one neglecting value after decimal.
Math.floor method of math class returns the value of number nearest to it lower one neglecting value after decimal.
package Example;
public class FloorExample {
public static void main(String[] args) {
System.out.println(Math.floor(12.36));
System.out.println(Math.floor (5.46));
System.out.println(Math.floor(36.55));
}
}
12.0
5.0
36.0
Previous | Home | Next |