

Input validation - a while loop can be used to create input routines that repeat until acceptable data is entered

It will never iterate if the Boolean expression is false A statement or block of statements that repeats as long as the expression is true. Header: BooleanExpression is any valid Boolean expressionīody: Any valid Java statement. Pretest loop - tests the Boolean expression before an iteration User controlled loop - allows the user to decide the number of iterations While Loop - pretest loop Infinite loop - if a loop does not have a way of stopping it continues to repeat until the program is interrupted Loop control variable - controls the number of time that the loop iterates This is usually done by incrementing the variable. it must update the control variable during each iteration.When the control variable reaches its maximum value, the loop terminates

