Final keyword in for statement
<p>I was reading some code found on the web and fell on these lines (java):</p>

<pre><code>private List&lt;String&gt; values;

[...]

for (final String str : values) {
   length += context.strlen(str);
}
</code></pre>

<p>What is the advantage of declaring a variable final in a for loop ? I thought the variable specified in the for loop was already read-only (e.g. can't assign something to 'str' in the above example). </p>

<p>Thx</p>
