What is the control flow of post-increment operator?
public class PostIncrement
{
public static void main(String[] args)
{
int a = 0;
for(int i=0;i< 2 ;i++)
{
a =a++;
}
for(int i=0 ;i< 1;i++)
{
a++;
}
System.out.println("Result2 :"+" "+a);
}
}
The results are like 0 and 1
Why is it so?