Lec-07 Continue Statement, Labeled Break, Labeled For Loop

4
58



Continue statement:-
The continue keyword can be used in any of the loop control structures. It causes the loop to immediately jump to the next iteration of the loop.
In a for loop, the continue keyword causes control to immediately jump to the update statement.
In a while loop or do/while loop, control immediately jumps to the Boolean expression.
Java Labeled For Loop/ Labeled Break:-
We can have name of each for loop. To do so, we use label before the for loop. It is useful if we have nested for loop so that we can break/continue specific for loop.
Normally, break and continue keywords breaks/continues the inner most for loop only.

Nguồn: https://quydinh.com

Xem thêm bài viết khác: https://quydinh.com/cong-nghe

4 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here