Exam 8: Arrays

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags
Match each term with the correct statement below.
Premises:
A statement used to return an array from a method
Responses:
range match
Java object names
array variable
Correct Answer:
Verified
Premises:
Responses:
A statement used to return an array from a method
range match
(Matching)
4.9/5
(81)

When a method returns an array reference, you include ____ with the return type in the method header.

(Multiple Choice)
4.8/5
(74)

When you perform a ____, you compare a value to the endpoints of numerical ranges to find the category in which a value belongs.

(Multiple Choice)
4.8/5
(92)

After you create an array variable, you still need to ____ memory space.

(Multiple Choice)
4.8/5
(83)

When you want to determine whether a variable holds one of many valid values, one option is to use a do…while loop to compare the variable to a series of valid values.

(True/False)
4.9/5
(79)

It is a good programming practice to ensure that a subscript to an array does not fall below zero, causing a(n) ____.

(Multiple Choice)
4.7/5
(80)

Using just one statement, declare and create an array that will reserve memory locations for 10 scores values that are type double .

(Essay)
4.8/5
(83)

Which of the following statements correctly declares and creates an array to hold five double scores values?

(Multiple Choice)
4.8/5
(69)

In which of the following statements is the value of myVals null ?

(Multiple Choice)
4.9/5
(85)
Match each term with the correct statement below.
Premises:
A primitive type
Responses:
passed by value
elements
reference type
Correct Answer:
Verified
Premises:
Responses:
A primitive type
passed by value
(Matching)
4.8/5
(83)
Match each term with the correct statement below.
Premises:
Represent computer memory addresses
Responses:
int
foreach loop
parallel arrays
Correct Answer:
Verified
Premises:
Responses:
Represent computer memory addresses
int
(Matching)
4.9/5
(80)

int[] multsOfTen = {10, 20, 30, 40, 50, 60}; The above code creates an array named multsOfTen . Describe how array sizes are determined when using an initialization list and how memory is assigned.

(Essay)
4.7/5
(71)

How can you use the enhanced for loop?

(Essay)
4.9/5
(79)

When any primitive type is passed to a method, the ____ is passed.

(Multiple Choice)
4.8/5
(84)

Which of the following statements correctly initializes an array with an initialization list?

(Multiple Choice)
4.7/5
(102)

You use a ____ following the closing brace of an array initialization list.

(Multiple Choice)
4.9/5
(68)

Why would you use spacing when initializing parallel arrays?

(Essay)
5.0/5
(77)
Showing 61 - 77 of 77
close modal

Filters

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