A loop is a compound statement that repeats the statements in its body zero or more times.
Related concepts: StatementRepetitionControl Flow
Closest Wikipedia entry: Control flow: Loops — In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an imperative programming language from a declarative programming language. Within an imperative programming language, a control flow statement is a statement that results in a choice being made as to which of two or more paths to follow.
Misconceptions about Loop10 documented MisconceptionsCheck Yourself
ForEachIteratesOverIndicesAn enhanced for loop iterates over the indices of an array or a collection
ForEachTraversesRecursiveStructureFor-each loops know how to traverse any recursive data structure
ForEachVariableIsElementOne can assign to the variable of an enhanced for statement to store a value in the corresponding array or collection element
ForIsConditionalThe body of a for statement executes at most once
ForVariableScopeBeyondLoopThe scope of variables declared in a for loop header extends beyond the loop
IfIsLoopThe body of an if statement executes repeatedly, as long as the condition holds
LoopBodyScopeImpliesLoopLifetimeLifetime of variables declared in a loop body extends across all loop iterations
LoopTerminatingConditionFor and while loops end when the condition becomes true
PreIncrementBeforeLoopPre-increment in update part of for loop means increment before loop body