title: Can anyone explain exactly what the post- and pre- increment is, because from what I know, I'm just getting more confused?
body: <p>shouldn't this be, 11 is good and 21 is bad? because, in case of i++, the value 10 first gets evaluated if equal to i, and then incremented?</p>
  <pre><code>int i = 10;
  if(i++ == i){
   System.out.println(i + &quot; is good&quot;);
  }
  else{
   System.out.println(i + &quot; is bad&quot;);
  }
  
  int j = 20;
  if(++j == j){
   System.out.println(j + &quot; is good&quot;);
  }
  else{
   System.out.println(j + &quot; is bad&quot;);
  }
  </code></pre>
  <p>Output: 11 is bad
  21 is good</p>