Rounding numbers to the nearest whole number, always upwards.
System. |
The ceil() method rounds a number upwards to the nearest integer.
Hint: For rounding a number downwards to the nearest integer, refer to the floor() method.
Hint: For rounding a number to the nearest integer in either direction, consider using the round() method.
public |
Parameter |
Description |
number |
Necessary: a number to be rounded upwards. |
Returns |
A double value indicating the nearest integer that is greater than or equal to the given number. |
Java Version |
Any |