0
Forgetting a break;
Forgetting a break it will just run the cases until it hits a break so it won run them all correct but if you run more then one case will it run until it finds 2 breaks? case a: case b: case c: break; case d: break; so if you call case a and case b
1 Odpowiedź
+ 1
A switch statement will run until it reaches a break, or until it has gone through every case (if there are no breaks), so yes, if case A or B is executed, it will finish at case C, because that's the closest break.