Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
The return keyword is used in functions/methods to send back a value to the caller. It terminates the execution of a function and passes control back to where it was called from.
Related terms
Void method/function: A void method or function does not return any value. It performs some actions but doesn't send anything back.
Return type: The return type specifies what type of value will be returned by a function/method.
Method call/invocation: A method call refers to using/calling a specific method in your program, which may include passing arguments and receiving returned values.