Ask Question
15 June, 19:43

When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the loop prepares for the next iteration.

+4
Answers (1)
  1. 15 June, 23:05
    0
    True

    Explanation:

    While looping through, there can be times that you do not want your code to do anything in some situations. Let's say you loop through an array consists of four numbers (1, 2, 3, and 4). You want to print all the values except 2. Check the code written in Java below.

    int [] numbers = {1, 2, 3, 4};

    for (int number : numbers) {

    if (number = = 2) {

    continue;

    }

    System. out. println (number);

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignored, and the ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers