The while loop operators, do ... while

Опубликовано: 23 Июнь 2026
на канале: JavaLight
42
1

The while statement.
The construction of the while statement:

While (Execution Condition) {
The body of the cycle;
}

The do ... while operator:
The construction of the operator do while:

Do {
The body of the cycle;
} While (condition of execution);

The difference of this operator from while is only that it is a postcondition operator (first execute, then check).
That is, even if the condition is never satisfied, all the same, the action will be executed once.