Exam 7: Arrays and the Arraylist Class

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

Java does not limit the number of dimensions that an array may have.

Free
(True/False)
4.9/5
(40)
Correct Answer:
Verified

True

What is the value of scores[2][3] in the following array? int [] [] scores = { {88, 80, 79, 92}, {75, 84, 93, 80}, {98, 95, 92, 94}, {91, 84, 88, 96} };

Free
(Multiple Choice)
4.8/5
(42)
Correct Answer:
Verified

A

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

Free
(Multiple Choice)
4.8/5
(48)
Correct Answer:
Verified

A

When an array is passed to a method:

(Multiple Choice)
4.8/5
(33)

When an individual element of an array is passed to a method:

(Multiple Choice)
4.9/5
(40)

You use this method to determine the number of items stored in an ArrayList object.

(Multiple Choice)
4.8/5
(37)

Objects in an array are accessed with subscripts, just like any other data type in an array.

(True/False)
4.8/5
(32)

If a[] and b[] are two integer arrays, the expression a == b compares the array contents.

(True/False)
4.9/5
(39)

By default, Java initializes array elements with what value?

(Multiple Choice)
4.9/5
(31)

The binary search algorithm:

(Multiple Choice)
4.8/5
(36)

What does the following statement do? double[] array1 = new double[10];

(Multiple Choice)
4.8/5
(46)

It is common practice to use a ____________ variable as a size declarator.

(Multiple Choice)
4.9/5
(43)

If final int SIZE = 15 and int[] x = new int[SIZE], what would be the range of subscript values that could be used with x[]?

(Multiple Choice)
4.7/5
(44)

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

(True/False)
4.8/5
(35)

What would be the results of the following code? 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.9/5
(39)

What would be the results after the following code was 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.7/5
(42)

A ragged array is:

(Multiple Choice)
4.7/5
(34)

Java limits the number of dimensions that an array may have to 15.

(True/False)
4.8/5
(33)

This indicates the number of elements, or values, the array can hold.

(Multiple Choice)
4.9/5
(36)

In order to do a binary search on an array,

(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 64
close modal

Filters

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