Exam 8: Arrays and the Arraylist Class

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

What will be the value of x[1] after the following code is executed? int[] x = {22,33,44}; ArrayProcess(x); … Public static void arrayProcess(int[] a) { For(int k = 0;k < 3;k++) { A[k] = a[k] + 5; } }

(Multiple Choice)
4.8/5
(33)

Given the following two-dimensional array declaration,which statement is true? int [][] numbers = new int [6] [9];

(Multiple Choice)
4.7/5
(39)

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

(True/False)
4.9/5
(34)

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

(Multiple Choice)
4.8/5
(40)

When an array is passed to a method

(Multiple Choice)
4.8/5
(37)

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.8/5
(39)

A ragged array is

(Multiple Choice)
4.9/5
(37)

The ArrayList class is in this package.

(Multiple Choice)
5.0/5
(37)

What will be returned from the following method? public static float[] getValue(int x)

(Multiple Choice)
4.7/5
(38)

Which of the following for loops is valid,given the following declaration? String[] names = {"abc","def","ghi","jkl"};

(Multiple Choice)
4.9/5
(28)

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

(Multiple Choice)
4.8/5
(43)

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.7/5
(44)
Showing 41 - 52 of 52
close modal

Filters

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