Exam 5: Methods

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following would be a valid method call for the following method? Public static void showProduct(double num1, int num2) { Double product; Product = num1 * num2; System.out.println("The product is " + Product); }

Free
(Multiple Choice)
4.8/5
(97)
Correct Answer:
Verified

D

You should always document a method by writing comments that appear:

Free
(Multiple Choice)
4.8/5
(68)
Correct Answer:
Verified

A

If method A calls method B, and method B calls method C, and method C calls method D, when method D finishes, what happens?

Free
(Multiple Choice)
4.8/5
(82)
Correct Answer:
Verified

C

In the header, the method name is always followed by this:

(Multiple Choice)
4.9/5
(78)

The phrase divide and conquer is sometimes used to describe:

(Multiple Choice)
4.9/5
(81)

Methods are commonly used to:

(Multiple Choice)
4.8/5
(90)

In a general sense, a method is:

(Multiple Choice)
4.8/5
(88)

The process of breaking a problem down into smaller pieces is sometimes called:

(Multiple Choice)
4.9/5
(69)

This type of method performs a task and then terminates.

(Multiple Choice)
4.8/5
(91)

The header of a value-returning method must specify this.

(Multiple Choice)
4.8/5
(73)

Values stored in local variables:

(Multiple Choice)
4.8/5
(88)

What is wrong with the following method call? DisplayValue (double x);

(Multiple Choice)
4.9/5
(84)

When an argument is passed to a method:

(Multiple Choice)
4.8/5
(72)

Local variables:

(Multiple Choice)
4.9/5
(75)

To document the return value of a method, use this in a documentation comment.

(Multiple Choice)
4.9/5
(88)

When an argument value is passed to a method, the receiving parameter variable is:

(Multiple Choice)
4.9/5
(84)

Methods are commonly used to break a problem into small manageable pieces.

(True/False)
4.9/5
(81)

Any method that calls a method with a throws clause in its header must:

(Multiple Choice)
4.8/5
(92)

Which of the following is NOT part of a method call?

(Multiple Choice)
4.9/5
(67)

Constants, variables, and the values of expressions may be passed as arguments to a method.

(True/False)
4.8/5
(79)
Showing 1 - 20 of 60
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)