I am surprised by the output of the following Java code. Normally, I would not do "a=a++;". But I just could not explain why the "a=" would yield a wrong result.
Please help.

=============================================
import java.io.*;

public class Test {

public static void main (String args[]) {
int a = 1;
System.out.println(a);
a=a++;
System.out.println(a);
}

}