Asked by Charisma Bennett on Jul 20, 2024

verifed

Verified

The body of a method that returns a value must contain at least one _________ statement.

A) void
B) invocation
C) thows
D) return

Return Statement

A statement in programming languages used to exit a function and optionally pass back a value to the caller.

Invocation

The act of calling a method or a function in a program.

Void

A keyword used in programming to specify that a method does not return a value.

  • Discern and grasp the characterizations of method types, covering those that are void and those that return values.
verifed

Verified Answer

LG
Lauren GrossJul 26, 2024
Final Answer :
D
Explanation :
A method that returns a value must use the "return" keyword to specify the value to be returned. The other options (void, invocation, and thows) do not relate to returning a value.