title: Java: Prefix/postfix of increment/decrement operators?
body: <p>From the program below or <a href="http://download.oracle.com/javase/tutorial/java/nutsandbolts/examples/PrePostDemo.java">here</a>, why does the last call to <code>System.out.println(i)</code> print the value <code>7</code>?</p>
  
  <pre><code>class PrePostDemo {
       public static void main(String[] args){
            int i = 3;
            i++;
            System.out.println(i);    // "4"
            ++i;             
            System.out.println(i);    // "5"
            System.out.println(++i);  // "6"
            System.out.println(i++);  // "6"
            System.out.println(i);    // "7"
       }
  }
  </code></pre>