If no cases match in a switch statement and there's no default clause, then none of the switch blocks will execute.

  • catch
  • final
  • else
  • default
In a switch statement, if no cases match and there's no default clause, none of the switch blocks will execute. The default clause provides a fallback option to handle cases where none of the defined cases match the switch expression.
Add your answer
Loading...

Leave a comment

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