Exam 9: Advanced Array Concepts

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

When working with two-dimensional arrays, the length field holds the number of rows in an array and each row has a length field that holds the number of columns in the row.

Free
(True/False)
4.8/5
(46)
Correct Answer:
Verified

True

When creating arrays, Java is limited in size due to limitations on the number of variables and subscripts used.

Free
(True/False)
4.8/5
(47)
Correct Answer:
Verified

False

A method that receives a two-dimensional array uses two ____________________ pairs following the data type in the parameter list of the method header.

Free
(Short Answer)
4.8/5
(44)
Correct Answer:
Verified

bracket
[ ]

The ArrayList class ____ method returns the current ArrayList size.

(Multiple Choice)
4.8/5
(46)

What is sorting and how are objects organized as a result of being sorted?

(Essay)
4.9/5
(44)

How can you sort arrays of objects?

(Essay)
4.8/5
(30)

The ArrayList class ____ method removes an item from an ArrayList at a specified location.

(Multiple Choice)
4.8/5
(38)

What are the limitations of the ArrayList class?

(Essay)
4.8/5
(32)

Write the statement to declare a three-by-four array of integers with the elements initialized to zero. Name the array myArray.

(Short Answer)
4.9/5
(43)

Match each term with the correct statement below. -A two-dimensional array that has rows of different lengths

(Multiple Choice)
4.8/5
(40)

int[][] myVals = {{10, 15, 20, 25}, {30, 35, 40, 45, 50, 55, 60}, {65, 70, 75, 80, 85, 90}}; Using the above array, what is the value of myVals.length? What is the value of myVals[1].length? What is the value of myVals[2].length? Explain how you determined these values.

(Essay)
4.9/5
(41)

Match each term with the correct statement below. -Arrays with more than one dimension; allowed in Java

(Multiple Choice)
4.9/5
(41)

Match each term with the correct statement below. -A package containing the Arrays class

(Multiple Choice)
4.9/5
(31)

When using the Arrays.binarySearch() method, it is not necessary for the list to be in order because the binarySearch() method will sort the items when called.

(True/False)
4.8/5
(32)

An ArrayList's ____ is the number of items it can hold without having to increase its size.

(Multiple Choice)
4.7/5
(32)

When mathematicians use a two-dimensional array, they often call it a ____.

(Multiple Choice)
4.9/5
(43)

Programmers often refer to a ____ search as a "divide and conquer" procedure.

(Multiple Choice)
4.8/5
(35)

The Arrays class ____ method returns true if the two specified arrays of the same type are equal to one another.

(Multiple Choice)
4.7/5
(37)

Using the ArrayList add() method, write the statement to insert "July" in the first position of the months ArrayList. Describe what would happen if the position number is invalid for the ArrayList.

(Essay)
4.9/5
(38)

The Arrays class ____________________ method assigns the specified value to each element of the specified array.

(Short Answer)
5.0/5
(40)
Showing 1 - 20 of 74
close modal

Filters

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