How to round to 1 decimal place using Java : <p>I am trying to round to the nearest decimal value, however, this line of code keeps returning a number between 0 and 1, I also want the output to be between 1 and 10. Where am I going wrong?</p>

<pre><code>power[i] = rng.nextDouble();
</code></pre>
