KnowledgeBoat Logo
|

Computer Applications

What is the significance of a break statement in a switch statement ?

Java Conditional Stmts

4 Likes

Answer

The break statement when used inside a switch, ends that case and proceeds to the first statement that follows switch statement. In case, the break statement is missing, the control flows to the next case below the matching case and continues to execute all the cases, till the end of switch statement. This is called fall through.

Answered By

3 Likes


Related Questions