for(int i=0;i<10;i++) {
System.out.println(i);
}
In this simple for loop, we initialize i at zero and increment it in every turn. But if we have already increment i, why is my output starting at 0. Didn’t it has to be 0? There is one more indication of that
for(int i=0;i<10;) {
i++;
System.out.println(i);
}
They’re both for loop but why are outputs different?
Probably because
is equivalent to: