The following code prints out \"3\", not \"4\" as you might expect.
public class Foo2 { public static void main(String[] args) { int a=1, b=2;
The postincrement/decrement operator (a++) returns the value before the increment. The preincrement/decrement (++a) returns the value after the increment.