Recall: Java Syntax
while ( <boolean expression> )
statement
called the �body� called the
of the loop �condition�
Example:
i= 0;
// General picture: integers 0..i-1 have been printed
while (i) {
System.out.println(i);
i= i+1;
}
Previous slide
Next slide
Back to first slide
View graphic version