All > Technology > Programming > Java
- 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.
David J. Barnes - Cite This Source - This Definition
- condition, continue statement, DO, do loop, FOR, infinite loop, iteration, loop variable, while, while loop