In which scenario would this kind of if statement be useful? `if (condition);`
<p>Today I read this line of Java code:</p>

<pre><code>if (results.add(userName));
</code></pre>

<p>For me, it is the first <code>if</code> statement I've ever seen which does not have a then or else clause. I was surprised that it is not a syntax error.</p>

<p>So is there any use of this kind of <code>if</code> statement at all? That is, an <code>if</code> without then or else clause.</p>
