Answer the following statements true (T) or false (F)

1. A method must always return a result to the method’s caller.
2. Two types of methods exist: subroutines and functions.
3. Method arguments can be constants, variables or more involved expressions.
4. The header for a function must define the return type of the value to be returned.
5. The Return statement must occur at the end of a method for it to operate correctly.
6. A function can return multiple values.



1. False. A method doesn’t have to return a value. It may simply perform its task then return control to the caller.
2. True.
3. True.
4. True.
5. False. A Return statement can occur anywhere in the method body.
6. False. A function returns exactly one value.

Computer Science & Information Technology

You might also like to view...

Data produced by a computer is sent to a(n) ____________, which formats and presents it.

a. input device b. output device c. storage device d. program

Computer Science & Information Technology

According to Design council findings, sales and revenue growth are more likely to occur for companies that increase design investment than those that don't

Indicate whether the statement is true or false

Computer Science & Information Technology

Tabs that are added to the ribbon automatically when a specific object, such as a picture, is selected, and that contain commands relevant to the selected object are:

A. selection tabs B. Backstage tabs C. contextual tabs

Computer Science & Information Technology

Sound can be expensive in terms of website size and download time.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology