The return statement must be followed a single variable that contains the value to be returned.

The return statement must be followed a single variable that contains the value to be returned.


Answer: False. The return statement may be following by any expression whose type is the same as the declared return type in the method header. For example, return x*y+6; is a valid return statement. The statement return; is also valid for a method that does not return anything (void).


Java

Learn More Multiple Choice Question :