Bird
0
0

Which of the following is the correct syntax to continue the outer loop labeled outerLoop in Kotlin?

easy📝 Syntax Q12 of 15
Kotlin - Loops and Ranges
Which of the following is the correct syntax to continue the outer loop labeled outerLoop in Kotlin?
Acontinue#outerLoop
Bcontinue outerLoop
Ccontinue(outerLoop)
Dcontinue@outerLoop
Step-by-Step Solution
Solution:
  1. Step 1: Recall Kotlin labeled continue syntax

    Kotlin uses the @ symbol to refer to labels with break or continue, so the correct syntax is continue@label.
  2. Step 2: Eliminate incorrect options

    Options B, C, and D use invalid syntax for labels in Kotlin.
  3. Final Answer:

    continue@outerLoop -> Option D
  4. Quick Check:

    Use continue@label to continue labeled loop [OK]
Quick Trick: Use @ symbol with label for continue or break [OK]
Common Mistakes:
MISTAKES
  • Omitting @ symbol before label
  • Using parentheses or other symbols with label
  • Confusing syntax with other languages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kotlin Quizzes