|
Executes a statement until a specified condition is False.
while (expression)
statement
expression
A Boolean expression checked before each iteration of the loop. If expression is True, the loop is executed. If expression is False, the loop is terminated.
statement
The statement to be executed if expression is True. Can be a compound statement.
The while statement checks expression before a loop is first executed. If expression is False at this time, the loop is never executed.
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.