Exam 7: Arrays and the Arraylist Class

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

When an array is passed to a method __________.

(Multiple Choice)
4.8/5
(34)

Declaring an array reference variable does not create an array.

(True/False)
4.9/5
(43)

The __________ indicates the number of elements the array can hold.

(Multiple Choice)
4.9/5
(39)

A search algorithm __________.

(Multiple Choice)
4.7/5
(32)

Each array in Java has a public field named __________ that contains the number of elements in the array..

(Multiple Choice)
4.9/5
(31)

If numbers is a two-dimensional int array that has been initialized and total is an int that has been set to 0, which of the following will sum all the elements in the array?

(Multiple Choice)
4.9/5
(46)

A partially filled array is normally used __________.

(Multiple Choice)
4.9/5
(32)

What will be the value of x[8] after the following code is executed? final int SUB = 12; Int[ ] x = new int[SUB]; Int y = 100; For(int i = 0; i < SUB; i++) { X[i] = y; Y += 10; }

(Multiple Choice)
4.8/5
(34)

What will be the results after the following code is executed? int[ ] x = { 55, 33, 88, 22, 99, 11, 44, 66, 77 }; Int a = 10; If(x[2] > x[5]) A = 5; Else A = 8;

(Multiple Choice)
4.8/5
(29)

What will be the results after the following code is executed? int[ ] array1 = new int[25]; ).. // Code that will put values in array1 Int value = array1[0]; For (int a = 1; a < array1.length; a++) { If (array1[a] < value) Value = array1[a]; }

(Multiple Choice)
4.8/5
(35)

What will be the result after the following code is executed? final int ARRAY_SIZE = 5; Float[ ] x = float[ARRAY_SIZE]; For (i = 1; i <= ARRAY_SIZE; i++) { X[i] = 10.0; }

(Multiple Choice)
4.8/5
(26)

To determine if two arrays are equal you must compare each of the elements of the two arrays.

(True/False)
4.8/5
(48)

What would be the result after the following code is executed? int[ ] x = {23, 55, 83, 19}; Int[ ] y = {36, 78, 12, 24}; For(int a = 0; a < x.length; a++) { X[a] = y[a]; Y[a] = x[a]; }

(Multiple Choice)
4.9/5
(42)

The sequential search algorithm __________.

(Multiple Choice)
4.8/5
(27)

When an individual element of an array is passed to a method __________.

(Multiple Choice)
4.9/5
(35)

An array can hold multiple values of several different types of data simultaneously.

(True/False)
4.8/5
(34)

An ArrayList object automatically expands in size to accommodate the items stored in it.

(True/False)
4.8/5
(47)

What would be the result after the following code is executed? final int SIZE = 25; Int[ ] array1 = new int[SIZE]; ).. // Code that will put values in array1 Int value = 0; For (int a = 0; a < array1.length; a++) { Value += array1[a]; }

(Multiple Choice)
4.8/5
(37)

A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order.

(True/False)
4.9/5
(37)

What would be the result after the following code is executed? int[ ] numbers = {40, 3, 5, 7, 8, 12, 10}; Int value = numbers[0]; For (int i = 1; i < numbers.length; i++) { If (numbers[i] < value) Value = numbers[i]; }

(Multiple Choice)
4.8/5
(30)
Showing 21 - 40 of 63
close modal

Filters

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