Exam 5: Methods

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

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

(Multiple Choice)
4.8/5
(46)

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

(Multiple Choice)
4.9/5
(41)

In a @return tag statement the description

(Multiple Choice)
4.8/5
(45)

Only constants and variables may be passed as arguments to methods.

(True/False)
4.8/5
(43)

You must have a return statement in a value-returning method.

(True/False)
4.9/5
(45)

Which of the following is included in a method call?

(Multiple Choice)
4.9/5
(43)

Assume that the following method header is for a method in class A. public void displayValue(int value) Assume that the following code segments appear in another method,also in class A.Which contains a legal call to the displayValue method?

(Multiple Choice)
4.8/5
(38)

Breaking a program down into small manageable methods

(Multiple Choice)
4.8/5
(37)

When a method tests an argument and returns a true or false value,it should return

(Multiple Choice)
4.9/5
(38)

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

(Multiple Choice)
4.9/5
(36)

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

(Multiple Choice)
4.9/5
(27)

When writing the documentation comments for a method,you can provide a description of each parameter by using a

(Multiple Choice)
4.9/5
(37)

Values stored in local variables

(Multiple Choice)
4.8/5
(39)

This type of method performs a task and then terminates.

(Multiple Choice)
4.9/5
(38)

All @param tags in a method's documentation comment must

(Multiple Choice)
4.8/5
(39)

A value-returning method can return a reference to a non-primitive type.

(True/False)
4.9/5
(35)

Which of the following is not a part of the method header?

(Multiple Choice)
4.9/5
(33)

What will be returned from the following method? public static double methodA() { Double a = 8.5 + 9.5; Return a; }

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.8/5
(32)

No statement outside the method in which a parameter variable is declared can access the parameter by its name.

(True/False)
4.8/5
(37)
Showing 21 - 40 of 50
close modal

Filters

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