Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What does the continue statement do in a loop?
Think about how it affects the way the loop runs.
Write a simple for loop that skips the number 2 using continue.
Use the if condition to check for the number.
What does the continue statement do in a loop?
Think about its effect on the loop's iterations.
True or False: The continue statement can be used in nested loops.
Consider how loops interact with each other.
You are given a list of scores from a game. Write a for loop that skips scores below 50 and prints the qualified scores.
Use a conditional to check the value of score.
Create a Java program to skip numbers that are divisible by 4 when printing numbers from 1 to 20.
Check divisibility using the modulus operator.
5 more questions in this section. Enroll free to practise them all.
Enroll free