Complete the code to skip printing the number 3 using the continue statement.
for (int i = 1; i <= 5; i++) { if (i == [1]) { continue; } System.out.println(i); }
The continue statement skips the current loop iteration when i equals 3, so 3 is not printed.
Complete the code to skip all even numbers using continue.
for (int i = 1; i <= 6; i++) { if (i % 2 == [1]) { continue; } System.out.print(i + " "); }
The condition i % 2 == 0 is true for even numbers, so continue skips printing them.
Fix the error in the loop to correctly skip printing negative numbers.
int[] numbers = {2, -3, 5, -1, 4};
for (int num : numbers) {
if (num [1] 0) {
continue;
}
System.out.print(num + " ");
}To skip negative numbers, continue when num is less than 0.
Fill both blanks to skip numbers divisible by 3 and print others.
for (int i = 1; i <= 10; i++) { if (i [1] 3 == [2]) { continue; } System.out.print(i + " "); }
The condition i % 3 == 0 is true for numbers divisible by 3, so continue skips them.
Fill both blanks to skip numbers less than 5 and print others.
for (int i = 1; i <= 7; i++) { if (i [1] [2]) { continue; } System.out.print(i + " "); }
The condition i < 5 is true for numbers less than 5, so continue skips them.
