What’s the purpose of using Break in each case of Switch Statement?

By ayush goel in 22 Sep 2023 | 11:29 am
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

What’s the purpose of using Break in each case of Switch Statement?

22 Sep 2023 | 11:29 am
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

- The `break` statement is used in each `case` of a `switch` statement to exit the `switch` block once a matching `case` is found. It prevents fall-through to subsequent `case` statements.


23 Sep 2023 | 04:26 pm
0 Likes

Report

Please describe about the report short and clearly.