|
Are there several branching statements in Java? A good answer might be:
Yes---there is the
Of these, the | |
The |
int count = 0; // initialize count to 0
do
{
System.out.println( count ); // loop body: includes code to
count++ ; // change the count
}
while ( count < 10 ); // test if the loop body should be
// executed again.
|
Notice how the do and the
while bracket the statements
that form the loop body.
The condition that is tested follows the while.
Does the code fragment include the three things that all loops must do?
Click Here after you have answered the question