return

The return keyword returns to the caller.

Purpose

The return statement returns to the caller of the code that contains this statement.

Syntax

return [expression];

Description

A return statement with an expression is allowed in a function with any return type other than void. The type of the returned expression must be assignable to the function return type.

Example

return this instanceof java.lang.String;