Break and Continue statement in Java | Java tutorials for beginners

preview_player
Показать описание
***Break statement in Java***
Normally, break statement is used inside for, switch, while and Do..while loop.

When java compiler reached break statement, it comes out of the current loop and starts executing the next line which presents after the loop.

If a break statement is used inside the nested loop, then it breaks only the inner loop.

***Continue statement in Java***
In Java, continue statement is most commonly used to skip the current iteration if the particular condition is met. It just skips the current iteration and doesn't break the loop so other iteration will be executed without any problem.

If the continue statement is used inside the nested loop, then it just skips the inner loop iteration.

Continue statement can be used in For loop, while loop and Do..while loop in java.

********** Tutorial Playlists **********

****** Contact me ********

******* Books written by me ********

******* Productivity tool *********

******* Gear Used To Shoot This Video ******
_Audio & Microphone

********Learning partner********

Рекомендации по теме
welcome to shbcf.ru