Originally posted by Alan Chong:
Those who have assembly background,how do you thing about my speculation ?
I think you're making this
way more complicated than it is. This wasn't a decision based on registers or processors. Nor is this a bug. This is the way Java works. It was intended to function this way.
The key is to understand how expressions are evaluated and how the post-increment operator functions. If you understand these things, you'd see that it would actually be strange for x=x++ to increment x. Rather, it should assign the original value to x, which is what occurs.
Corey