Ask Question
14 July, 09:12

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.

+1
Answers (1)
  1. 14 July, 11:26
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers