JUMP STATEMENTS in JAVA
JUMP STATEMENTS Java supports three jump statements: break, continue, and return. These statements transfer control to another part of your program. 1. break. 2. continue. 3. return. 1 The break statement · This statement is used to jump out of a loop. · On encountering a break statement within a loop, the execution continues with the next statement outside the loop. · The remaining statements which are after the break and within the loop are skipped. · Break statement can also be used with the label of a statement. · A statement can be labeled as follows. statementName : SomeJavaStatement · When we use break statement along with label as break statementName; An example of break statement class break1 { public static void main(String args[]) { int i = 1; while (i<=10) { System