Java Reference
In-Depth Information
Otherwise, there is a choice based on the resulting value:
♦ If the value is
true
, then the entire
do
statement is executed again.
♦ If the value is
false
, no further action is taken and the
do
statement completes
normally.
• If execution of the
Statement
completes abruptly, see §
14.13.1
.
Executing a
do
statement always executes the contained
Statement
at least
once.
14.13.1. Abrupt Completion of
do
Statement
Abrupt completion of the contained
Statement
is handled in the following manner:
• If execution of the
Statement
completes abruptly because of a
break
with no label,
then no further action is taken and the
do
statement completes normally.
• If execution of the
Statement
completes abruptly because of a
continue
with no la-
bel, then the
Expression
is evaluated. Then there is a choice based on the resulting
value:
♦ If the value is
true
, then the entire
do
statement is executed again.
♦ If the value is
false
, no further action is taken and the
do
statement completes
normally.
• If execution of the
Statement
completes abruptly because of a
continue
with label
L
,
then there is a choice:
♦ If the
do
statement has label
L
, then the
Expression
is evaluated. Then there is a
choice:
If the value of the
Expression
is
true
, then the entire
do
statement is ex-
ecuted again.
If the value of the
Expression
is
false
, no further action is taken and the
do
statement completes normally.
♦ If the
do
statement does not have label
L
, the
do
statement completes abruptly
because of a
continue
with label
L
.
• If execution of the
Statement
completes abruptly for any other reason, the
do
state-
ment completes abruptly for the same reason.
The case of abrupt completion because of a
break
with a label is handled by the