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
(43)
Correct Answer:
Verified

D

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

Free
(Multiple Choice)
4.8/5
(30)
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
(44)
Correct Answer:
Verified

C

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

(Multiple Choice)
4.9/5
(37)

The phrase divide and conquer is sometimes used to describe:

(Multiple Choice)
4.9/5
(41)

Methods are commonly used to:

(Multiple Choice)
4.8/5
(41)

In a general sense, a method is:

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.9/5
(34)

This type of method performs a task and then terminates.

(Multiple Choice)
4.8/5
(37)

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

(Multiple Choice)
4.8/5
(31)

Values stored in local variables:

(Multiple Choice)
4.8/5
(42)

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

(Multiple Choice)
4.9/5
(33)

When an argument is passed to a method:

(Multiple Choice)
4.8/5
(33)

Local variables:

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.9/5
(46)

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

(Multiple Choice)
4.8/5
(41)

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

(True/False)
4.9/5
(41)

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

(Multiple Choice)
4.7/5
(43)

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

(Multiple Choice)
4.9/5
(31)

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

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

Filters

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