This is a very simple for loop:
for(int i=0;i<=100;i++)
{
System.out.println(i);
}
I know how it mostly works, but I don't understand how the i++
works at the end: its supposed to add 1, if I'm correct, but when it prints out the i
, it prints out 0 and then 1.
Why doesn't it just start out with 1 because of the i++
? Why does it still just print out the original value instead of the i++
value?