Why does adding a semicolon after 'for (...)' change the meaning of my program so dramatically?
<p>I wrote the following class:</p>

<pre><code>  public class TestOne {
     public static void main(String[] args) {
        int count = 0;
        for (int i = 0; i &lt; 100; i++) {
          count++;
        }
        System.out.println(count);
     }
   }
</code></pre>

<p>The output is <code>100</code>.</p>

<p>Then I added a semicolon:</p>

<pre><code>    public class TestOne {
     public static void main(String[] args) {
        int count = 0;
        for (int i = 0; i &lt; 100; i++); {     // &lt;-- Added semicolon
          count++;
        }
        System.out.println(count);
     }
   }
</code></pre>

<p>The output is <code>1</code>.</p>

<p>The result is unbelievable. Why does this added semicolon change the meaning of my program so dramatically?</p>
