Rewrite the following loop (java)
<p>I am a total beginner in the field of programming. I have worked with the basics, but I have no clue on how to do the following:</p>

<p>Rewrite the following loop, using the enhanced for loop construct. Here, values is an array of floating-point numbers.</p>

<pre><code> for (int i = 0; i &lt; values.length; i++) { total = total + values[i]; }
</code></pre>