Rewrite: “Approximate the numbers to the nearest whole number.”
System. |
Definition and UsageThe round() function rounds a number to the closest integer.
One of the following:
public static long round(double number) |
public static int round(float number)
|
Parameter |
Description |
number |
“Necessary. A value to be rounded.” |
Returns: |
“A long integer (if the argument is a double) or an integer (if the argument is a float) representing the closest whole number to a given value.” |
Java Version: |
Any |