
reference.language.return.html Maven / Gradle / Ivy
Return statements
Return statements
A return statement is used to exit a method explicitly, and optionally return a value.
In the absence of a return statement, a method exits after executing the last statement, without returning a value.
A return statement has the form return
eventually follwed by expression
, where expression is any valid expression.
Exiting a method without returning a value
Returning a value
Multiple return statements
Prompto supports multiple return statements in a method body, provided that all return expressions have compatible types
© 2015 - 2025 Weber Informatics LLC | Privacy Policy