The java lang math ceil double a returns the smallest closest to negative infinity double value that is greater than or equal to the argument and is equal to a mathematical integer.
Java math ceil and floor.
Special cases if the argument value is already equal to a mathematical integer then the result is the same as the argument.
The smallest integer greater than or equal to the given number.
If the argument is nan or an infinity or positive zero or negative zero then the result is the same as the argument.
If the argument is integer then the result is integer.
Java math abs round ceil floor min methods with example.
If the argument value is less than zero but greater than 1 0 then.
Syntax math ceil x parameters x a number.
Java math class provides useful methods for performing the math s operations like exponential logarithm roots and trigonometric equations too.
This tutorial teaches java math class with examples.
If the passed argument is an integer the value will not be rounded.
The ceil method rounds a number upwards to the nearest integer and returns the result.