4. Break and continue #

Created Tuesday 22 October 2019

Break and continue are used to alter the normal flow of the **for, while **loops and the switch statement. **break: ** This exits only the innermost loop where we are currently in. loop1{int a loop2{ int b break; loop3{int a } } }

the break here will not let loop3 execute for any iteration of loop2. No.of times run = a*b continue: This will skip execution of the code below continue and take the nearest current to the next iteration.