Exam 7: Arrays and Arraylists

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

Class Arrays methods sort, binarySearch, equals and fill are overloaded for primitive-type arrays and Object arrays. In addition, methods __________ and __________ are overloaded with generic versions.

(Multiple Choice)
4.9/5
(39)

Which set of statements totals the values in two-dimensional int array items?

(Multiple Choice)
4.7/5
(35)

Which command below runs TestProgram, and passes in the values files.txt and 3?

(Multiple Choice)
4.9/5
(29)

Which of the following is false?

(Multiple Choice)
4.8/5
(29)

A(n)________ indicates a problem that occurs while a program executes.

(Multiple Choice)
4.9/5
(42)

Which flag in a format specifier indicates that values with fewer digits than the field width should begin with a leading 0?

(Multiple Choice)
4.8/5
(39)

Which statement below initializes array items to contain 3 rows and 2 columns?

(Multiple Choice)
4.8/5
(25)

Which of the following sets of statements creates a multidimensional array with 3 rows, where the first row contains 1 value, the second row contains 4 items and the final row contains 2 items?

(Multiple Choice)
4.8/5
(39)

Invalid possibilities for array indices include .

(Multiple Choice)
4.8/5
(36)

Which of the following statements is false?

(Multiple Choice)
4.9/5
(43)

How many Book objects are created by the following statement? Book[] books = new Book[10];

(Multiple Choice)
5.0/5
(33)

Which of the following statements about arrays are true? A. An array is a group of variables containing values that all have the same type. B. Elements are located by index. C. The length of an array c is determined by the expression c.length();. D. The zeroth element of array c is specified by c[0].

(Multiple Choice)
4.9/5
(31)

When you pass an array or an individual array element of a reference type to a method, the called method receives ________. When you pass an individual element of a primitive type, the called method receives ________.

(Multiple Choice)
4.9/5
(36)

Consider the code segment below. Which of the following statements is false? int[] g; G = new int[23];

(Multiple Choice)
4.8/5
(30)

In Java, multidimensional arrays ________.

(Multiple Choice)
4.8/5
(28)

Which statement correctly passes the array items to method takeArray? Array items contains 10 elements.

(Multiple Choice)
4.7/5
(23)

Arrays are ________.

(Multiple Choice)
4.9/5
(38)

Which of the following tasks cannot be performed using an enhanced for loop?

(Multiple Choice)
4.7/5
(36)

A programmer must do the following before using an array:

(Multiple Choice)
4.9/5
(32)

Which of the following statements about creating arrays and initializing their elements is false?

(Multiple Choice)
4.9/5
(40)
Showing 21 - 40 of 46
close modal

Filters

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