Difference between labelled and unlabelled break.
Answers
Answered by
5
Answer:
The labelled statement can be any block statement; it does not have to be preceded by a loop statement. Without a label, break will break out of the inner loop. With a label you can stop execution of nested loops. the break is given in only inner for loop.
Answered by
2
Labeled break statement is used to terminate the outer loop, whereas Unlabeled break is to used to exit the loop after satisfy
Explanation:
Labeled break statement is used to terminate the outer loop, the loop should be labeled for it to work. Here is an example showing java break label statement usage.
whereas
Unlabeled break is to used to exit the loop when it satisfies a specific condition without checking the test expression. Then, transfers the control to the following statement of while block.
#Learn more:
What are labeled data and unlabelled data?
https://brainly.in/question/2917607#
Similar questions