What will the following code print?
void m (){ int c = 0; Label1 : while (c < 8){ Label2: System.out.println (c); if (c > 3) break Label1; else c++; } }
Select 1 option
Correct Option is : E
This is a forward loop that contains a labelled break statement.
A labelled break breaks out of the loop that is marked with the given label.
Therefore, a labelled break is used to break out from deeply nested loops to the outer loops.