title: Semicolon at end of 'if' statement
body: <p>Today, after half an hour of searching for a bug, I discovered that it is possible to put a semicolon after an if statement instead of code, like this:</p>
  
  <pre><code>if(a == b);
  // Do stuff
  </code></pre>
  
  <p>Which basically means that the stuff will be done whether <code>a</code> equals <code>b</code> or not, and the <code>if</code> statement has no point whatsoever. Why doesn't Java give me an error? Is there any situation in which this would be useful?</p>