Java SE 8 Programmer I — Question 91

Which is true about the switch statement?

Answer options

Correct answer: B

Explanation

The correct statement is B because the break statement is indeed optional in a switch statement; if omitted, execution will continue to the next case. Options A, C, and D are incorrect as a switch statement's expression evaluates to a single value, case labels cannot be modified during execution, and while a default case can be included, it is not mandatory.