Java: Impact of using 'if' instead of while loop during an iteration
<p>I have a code something like this </p>

<pre><code>Enumeration parameterEnum = request.getParameterNames()
while(parameterEnum.hasMoreElements()){}
</code></pre>

<p>what is the difference if I change it from a while statement into an if statement?</p>
