Exam 7: Arrays and the Arraylist Class

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

What would be the results after the following code was executed? int[] x = {23, 55, 83, 19}; Int[] y = {36, 78, 12, 24}; X = y; Y = x;

(Multiple Choice)
4.8/5
(36)

To compare the contents of two arrays, you must compare the elements of the two arrays.

(True/False)
4.8/5
(39)

Java performs ____________, which means that it does not allow a statement to use a subscript that is outside the range of valid subscripts for the array.

(Multiple Choice)
4.9/5
(44)

What will be the results of the following code? final int ARRAY_SIZE = 5; Double[] x = new double[ARRAY_SIZE]; For(int i = 1; i <= ARRAY_SIZE; i++) { X[i] = 10.0; }

(Multiple Choice)
4.8/5
(39)

A search algorithm:

(Multiple Choice)
4.8/5
(37)

You can use this ArrayList class method to replace an item at a specific location in an ArrayList.

(Multiple Choice)
4.8/5
(38)

Declaring an array reference variable does not create an array.

(True/False)
4.8/5
(37)

Once an array is created, its size cannot be changed.

(True/False)
4.8/5
(40)

If numbers is a two-dimensional array, which of the following would give the length of row r?

(Multiple Choice)
4.8/5
(38)

The following statement creates an ArrayList object. What is the purpose of the <String> notation? ArrayList<String> arr = new ArrayList<String>();

(Multiple Choice)
4.9/5
(35)

You can use this ArrayList class method to insert an item at a specific location in an ArrayList.

(Multiple Choice)
4.8/5
(42)

What will be the result of executing the following code? int[] x = {0, 1, 2, 3, 4, 5};

(Multiple Choice)
4.8/5
(36)

What do you normally use with a partially-filled array?

(Multiple Choice)
4.8/5
(35)

Which of the statements are true about the following code? final int ARRAY_SIZE = 10; Long[] array1 = new long[ARRAY_SIZE];

(Multiple Choice)
4.9/5
(36)

Subscript numbering always starts at what value?

(Multiple Choice)
5.0/5
(33)

This ArrayList class method deletes an item from an ArrayList.

(Multiple Choice)
4.9/5
(33)

The sequential search algorithm:

(Multiple Choice)
4.9/5
(41)

A sorting algorithm is used to locate a specific item in a larger collection of data.

(True/False)
4.9/5
(28)

This ArrayList class method is used to insert an item into an ArrayList.

(Multiple Choice)
4.8/5
(36)

To return an array of long values from a method, use this as the return type for the method.

(Multiple Choice)
4.7/5
(43)
Showing 41 - 60 of 64
close modal

Filters

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