Jump statement in Java:-
A statement that is used to transfer the control to various part of the loop is called a jump statement.
There are five jump statements in java.
Break:- Break is the jump statement use to terminate loop force ling that is used to terminate the loop even the condition is true. It is always used with if statement.
Continue:- Continue is the jump statement use to skip the step of the loop. That is used to execute all the states of the loop and some time used the leave one or more statement of a loop. It is always used with if statement.
Goto:- It is used to transfer the control randomly to the gram. The implementation is goto has not been providing yet by the java so it can’t be used by the programmer.
Return:- Return is jump statement used to return the control from calling program to any part of the program.
a) Return:- It will return null or control from the calling program to the caller.
b) Return constant:- It will return the constant data.
c) Return variable:- It will return the value of the variable.
d) Return expression:- It will return the result of the expression.