Match each Java keyword used in branching with its purpose:
A1-A, 2-B, 3-C
B1-B, 2-A, 3-C
C1-C, 2-B, 3-A
D1-A, 2-C, 3-B
Answer & Solution
Correct answer: A. 1-A, 2-B, 3-C
break stops fall-through. default runs when no cases match. else if tests subsequent conditions.
Keep practising Conditional Statements in Java
Browse all Conditional Statements in Java questions for ICSE Class 8, or explore more Computer Applications topics.
Related questions
Match each Java conditional pitfall with its definition:Match each ternary operator part in Java with its role (condition ? exp1 : exp2):Match each Java conditional construct with its syntax and use:What term describes execution continuing into the next switch branch?Which statement was added in Java SE 13 to return switch values?What dual criteria must definition by cases meet in formal logic?How many comparisons does binary search take across switch cases?What is the expression tested in a switch statement called?