I see a for loop like this:
for (init_statement; bound_checking; step_statement) {}
So, normally you would do this:
for (int i = 0; i < 10; i++)
But, if i is already defined, then you don't have to put it in the for loop:
int i = 3;
for ( ; i< 10; i++)
And let's say your loop ends only on specific conditions:
int i = 3;
for ( ; ; i++) {
...
if (condition1 && condition2)
break;
}
Now let's say your step is defined somewhere in the loop:
int i = 3;
for ( ; ; ) {
...
if (condition1 && condition2)
break;
i += someNumber;
}
Once you get to this point, for (;;) is the same as do .. while(true), which is
the same as while(true).