A while statement executes its statements as long as a specified condition evaluates to true. A while statement looks as follows: