Specifications

Sun Services
Java™ Programming Language
Module 4, slide 25 of 31
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Looping Statements
The while loop:
while (
<test_expr>
)
<statement_or_block>
Example:
int i = 0;
while ( i < 10 ) {
System.out.println(i + " squared is " + (i*i));
i++;
}