Hints for Chapter 6: Methods
Problem 11: rounding off
The method roundToOne will
- be a public method;
- be a static (class) method;
- have no return type (i.e. a void method) as the method directly modifies the
elements of the array passed to it;
- have one parameter of type double [] denoting the array of floating point
numbers that we want rounded to 1 significant digit.
Try to create a scenario for the method roundToOne before looking at the next hint.
Next Hint