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;
This isn't a matter of precedence, it's a matter of the definition of the operator. By definition the postfix operator executes after the variable is used in the enclosing expression.