If multiple case labels match the switch expression, then only the ________ matching case will be executed.

  • all
  • first
  • first-matching
  • last
When there are multiple case labels that match the switch expression in Java, only the first-matching case will be executed. Subsequent cases with matching labels will be ignored, ensuring that only the first matching case block is executed.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *