Exam 8: Arrays

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

When array elements are passed by value, a copy of the value is made and used within the receiving method.

(True/False)
5.0/5
(73)

If a class has only a default constructor, you must call the constructor using the keyword ____ for each declared array element.

(Multiple Choice)
4.9/5
(88)

Since an array name is a reference, you are able to use the = operator for assigning and the == operator for comparisons.

(True/False)
5.0/5
(79)

Match each term with the correct statement below. -An array field

(Multiple Choice)
4.9/5
(85)

Write the statement to create an array named studentScores that will store five integer value student scores. Initialize the array using an initialization list with the values 70, 85, 92, 67, and 76.

(Essay)
4.8/5
(75)

While you can provide any legal identifier you want for an array, conventional rules are typically followed. List and describe the naming conventions for naming arrays.

(Essay)
4.9/5
(80)

Describe a situation in which storing just one value at a time in memory does not meet your needs.

(Essay)
4.9/5
(74)

When you declare or access an array, you can use any expression to represent the size, as long as the expression is a(n) ____________________.

(Short Answer)
4.9/5
(78)

When an application contains an array and you want to use every element of the array in some task, it is common to perform loops that vary the loop control variable from 0 to one less than the size of the array.

(True/False)
4.9/5
(82)

Match each term with the correct statement below. -Numbered beginning with 0

(Multiple Choice)
4.8/5
(80)

double[] studentScores; double studentScores[]; Are both of the above statements valid for declaring an array variable? Why or why not?

(Essay)
4.9/5
(76)

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

(Multiple Choice)
4.8/5
(91)

When you initialize parallel arrays, it is convenient to use ____ so that the values that correspond to each other visually align on the screen or printed page.

(Multiple Choice)
4.8/5
(77)

The length ____ contains the number of elements in the array.

(Multiple Choice)
4.7/5
(78)

Match each term with the correct statement below. -An enhanced for loop

(Multiple Choice)
4.8/5
(85)

What is a subscript and how are the array's elements numbered?

(Essay)
4.8/5
(74)

Why would you use spacing when initializing parallel arrays?

(Essay)
4.8/5
(79)

Match each term with the correct statement below. -A nonprimitive object

(Multiple Choice)
4.8/5
(94)

In Java, the size of an array ____ declared immediately following the array name.

(Multiple Choice)
4.8/5
(82)

Write the statement to declare an array of integers that will hold studentScores.

(Essay)
5.0/5
(76)
Showing 41 - 60 of 74
close modal

Filters

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