floor() Method in java
Java Programming Language / Number Class in java
873Program:
public class WrapperfloorMethod { public static void main(String args[]) { double d = -200.675; float f = -920; System.out.println(Math.floor(d)); System.out.println(Math.floor(f)); System.out.println(Math.ceil(d)); System.out.println(Math.ceil(f)); } } /* Returns the largest integer that is less than or equal to the argument. Returned as a double. */
Output:
-201.0 -920.0 -200.0 -920.0 Press any key to continue . . .
This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.
# C Tutorials
# JAVA Tutorials
# HTML Tutorials
# Computer Fundamental
# Data Structure
# DBMS Tutorials
SQL
# C# Language
# R Language
# PHP
# Python
# Vue JS