; at end of condition causing unexpected behaviour
<p>Just found a bug in this code : </p>

<pre><code>    for(String link : tempList1){
        if(!tempList2.contains(link));{
            listToPopulate.add(link);
        }
    }
</code></pre>

<p>The ';' at the end of if(!tempList2.contains(link)) causes the condition to evaluate to true, even though it should be false. Why is this occurring ?</p>

<p>Fix is to just remove the ';'</p>
