One of Java's three control structures used for looping. The other two are the while loop and do loop. A for loop consists of a loop header and a loop body. The header consists of three expressions separated by two semicolons and one or more of these may be omitted. The first expression is only evaluated once, at the point the loop is entered. The middle expression is a boolean expression representing the loop's termination test. An empty expression represents the value
true. The third expression is evaluated after each completion of the loop's body. The loop terminates when the termination test gives the value
false. The statements in the loop body might be executed zero or more times.
- Browse Related Terms: bounded repetition, Condition, continue statement, control structure, do, do loop, FOR, for loop, hot spot, if statement, if-else statement, infinite loop, iteration, loop variable, repetition, statement, Toggle, unbounded repetition, while, while loop