Exam 8: Arrays

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

You can declare an array variable by placing curly brackets after the array name.

(True/False)
4.7/5
(77)

Why would you use spacing when initializing parallel arrays?

(Essay)
4.9/5
(79)

Why is the length field a good option when writing a loop that manipulates an array? What programming error is common when attempting to use length as an array method?

(Essay)
4.8/5
(74)

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

(Multiple Choice)
4.8/5
(86)

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

(Multiple Choice)
4.9/5
(85)

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

(Essay)
4.9/5
(80)

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.9/5
(63)

When using parallel arrays, if one array has many possible matches, it is most efficient to place the less common items first so that they are matched right away.

(True/False)
4.8/5
(74)

A ____ array is one with the same number of elements as another, and for which the values in corresponding elements are related.

(Multiple Choice)
4.9/5
(88)

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.9/5
(76)

How can you use the enhanced for loop?

(Essay)
4.9/5
(72)

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
(71)

How would you use a method that belongs to an object that is part of the array? Use an example and demonstrate with Java code.

(Essay)
4.8/5
(80)

When you declare or access an array, you can use any expression to represent the size, as long as the expression is  _____.

(Multiple Choice)
4.9/5
(87)

What is different about passing an array to a method rather than passing a primitive type to a method?

(Essay)
4.9/5
(86)

When returning an array reference, square brackets are included with the return type in the method header.

(True/False)
4.9/5
(78)

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

(Multiple Choice)
4.8/5
(84)

How would a programmer perform a range match when writing an application that takes into consideration different discount rates for customers? Give an example.

(Essay)
4.9/5
(82)

When you declare int[] someNums = new int[10]; , each element of someNums has a value of ____________________ because someNums is an integer array.

(Short Answer)
4.9/5
(83)

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

(Short Answer)
4.9/5
(70)
Showing 21 - 40 of 66
close modal

Filters

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