MCQ Single Best Answer Moderate

QWhat is the purpose of the break statement in a switch?

ID: #24860 Control flow in programming 3 views
Question Info
#24860Q ID
ModerateDifficulty
Control flow in programmingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A To continue to the next iteration
  • B To stop execution of the current loop
  • C To exit the switch statement
  • D To declare a variable
Correct Answer: Option C

Explanation

Correct Answer:

(c) To exit the switch statement

Explanation:

break stops the switch execution immediately.

Without break, Java continues executing the next cases.

Share This Question

Challenge a friend or share with your study group.