[Solved] Java loop not iterating [closed]


for ( a = line.getSize() - 1; a >= 0; a--);
    test(a, line);   
}

You have a semicolon at the end of your for loop.

What happens is that the for loop loops but never executes test. So a is set to -1 through the iterations then test is called.

Get rid of the semicolon at the end of the for loop and it will work.

2

solved Java loop not iterating [closed]