The number of loop body executions

Report a typo

How many times will the loop body be executed?

int counter = 0;
boolean shouldBeStopped = false;

while (!shouldBeStopped) {
   if (counter == 3) {
      shouldBeStopped = true;
   }
   counter++;
}
Select one option from the list
___

Create a free account to access the full topic