Break Statement in JSP

Advertisement

The use of break statement is to escape early from the loop. It allows the program to escape from the for, while, switch and do while loops.

Break Statement in JSP

The use of break statement is to escape early from the
loop. It allows the program to escape from the for, while, switch
and do while loops. A break may only appear on one of
these statements. It is mainly used to escape early from the loop.

In this program we are using the switch statement under
which we will use break statement. The for loop will run from 0 to 5.