Exam 9: Advanced Array Concepts

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

int[] myVals = {2, 4, 6, 8} Using the above four-element array, what is the value of myVals[1]?

(Multiple Choice)
4.8/5
(35)

When you start with the object that has the largest value, you are sorting in ____________________ order.

(Short Answer)
4.8/5
(41)

The bubble sort is the fastest and most efficient sorting technique.

(True/False)
4.9/5
(42)

Write the statement that assigns the integer value 20 to the first column of the first row of an array named myVals.

(Short Answer)
4.8/5
(38)

____ is the process of arranging a series of objects in some logical order.

(Multiple Choice)
4.9/5
(36)

Java provides a(n) ____ class, which contains many useful methods for manipulating arrays.

(Multiple Choice)
4.8/5
(32)

Write the statement to declare an ArrayList named myVals with a capacity of 15 items. Explain the importance of capacity when working with an ArrayList.

(Essay)
4.8/5
(36)

Match each term with the correct statement below. -Use them with the class name without instantiating an object

(Multiple Choice)
4.9/5
(39)

import java.util.*; import javax.swing.*; public class binary_search { public static void main(String[] args) { int myNums[]={2, 44, 5, 66, 78, 90, 23, 66}; int point, find = 78; point = Arrays.binarySearch(myNums, find); System.out.println("Element found at index " + point); } } Using the above code, what output will be displayed when the program is executed? Describe how the binarySearch() method functions.

(Essay)
4.8/5
(25)

Match each term with the correct statement below. -Alters an item at a specified ArrayList location

(Multiple Choice)
4.8/5
(46)

Write the code for bubble sorting a someNums array of integers.

(Essay)
4.8/5
(47)

You can think of the single dimension of a single dimensional array as the height of the array.

(True/False)
4.9/5
(36)

The simplest possible sort involves two values that are out of order.

(True/False)
5.0/5
(43)

int[][] studentScores = {{70, 82, 90, 68}, {95, 75, 67, 89}, {98, 79, 57, 81}}; Using the above two-dimensional array, what is the value of studentScores[0][0]? What is the value of studentScores[2][3]? What is the value of studentScores[1][2]? Describe how arrays reference values with subscripts.

(Essay)
4.8/5
(40)

In Java, you create an enumerated data type in a statement that uses the keyword ____.

(Multiple Choice)
4.8/5
(44)

Regarding enumerations, the ____ method returns an array of the enumerated constants.

(Multiple Choice)
4.8/5
(37)

What are some of the advantages of declaring an ArrayList with a specified type?

(Essay)
4.7/5
(32)

How can you use the length field with a two-dimensional array?

(Essay)
4.8/5
(47)

Match each term with the correct statement below. -Two or more columns of values

(Multiple Choice)
4.8/5
(42)

Match each term with the correct statement below. -Adds an item to the end of an ArrayList

(Multiple Choice)
4.7/5
(40)
Showing 41 - 60 of 74
close modal

Filters

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