return statement
Java
A statement used to terminate the execution of a method. A method with void return type may only have return statements of the following form
return;A method with any other return type must have at least one return statement of the form
return expression;where the type of
expression must match the return type of the method.