How to Use Math.floor() in Java


In this example we will show you how to use math.floor() in Java.

Source Code

package com.beginner.examples;

public class Floor {
  public static void main(String[] args){
    System.out.println(Math.floor(6.3)); // use math.floor()
  }
}

Output:

6.0
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments