I\'m doing some research about Java and find this very confusing:
for (int i = 0; i < 10; i = i++) {
System.err.print(\"hoo... \");
}
You're using post-increment: i = i++;, it means something like this:
temp = i;
i = i + 1;
i = temp;
because 15.14.2 Postfix Increment Operator ++:
The value of the postfix increment expression is the value of the variable before the new value is stored.
That is why you have the old value.
For-loop done right:
for (int i = 0; i < 10; i++) {
System.err.print("hoo... ");
}