Recently I came across this piece of Java code:
int a=0;
for(int i=0;i<100;i++)
{
a=a++;
}
System.out.println(a);
The value printed for 'a' is 0. However in case of C, the value for 'a' comes out to be 100.
I am not able to understand why the value is 0 in case of Java.