0

Is it necessary to use break statement after every case.... ?

14th Dec 2017, 10:49 AM
Akshat Agarwal
Akshat Agarwal - avatar
2 Answers
+ 3
There's no need for break after the last case since it automatically leaves the switch statement. Otherwise if you want to prevent case-overflow, yes.
14th Dec 2017, 10:51 AM
Kevin Eldurson
Kevin Eldurson - avatar
0
ya I was also thinking the same .
14th Dec 2017, 10:53 AM
Akshat Agarwal
Akshat Agarwal - avatar