title: Why can't I define a variable inside a for loop in this way?
body: <p>Through a test I found out that,</p>
  
  <p>This is not legal : </p>
  
  <pre><code>for (int i= 0; i &lt; 1000000000; i++) 
      int j = i &amp; i+1 ; // j cannot be declared here!
  </code></pre>
  
  <p>but this is :</p>
  
  <pre><code>for (int i= 0; i &lt; 1000000000; i++) { 
      int j = i &amp; i+1 ;
  }
  </code></pre>
  
  <p>Why?</p>