I am really confused about how the post-increment operator in Java works. I was referring to a doc, where the author says:

j=j++ ;

is equivalent to:

temp=j;
j=j+1;
j=temp;

But, what I have learned is:

a=b++;

Which evaluates like:

a=b;
b=b+1;

So, following this logic:

j=j++;

Should be evaluated as:

j=j;
j=j+1;

So, where does this **temp** comes from? I am not able to understand this temp concept. Please do leave your explanation regarding this.