title: Why the value of i is not changing inside the for loop
body: <pre><code>class Test 
  {
      public static void main(String args[])
       {
           int i=1;
           for(int j=0;j&lt;=2;j++)
               {
                   i=i++;
               }
            System.out.println(i);
        }
  }
  </code></pre>
  
  <p>Why in this question the value of i is printing 1.</p>