Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Data Collections, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 201–210 of 1,079
  1. 201
  2. 202
  3. 203
  4. 204
  5. 205
  6. 206
  7. 207
  8. 208
  9. 209
  10. 210

Question 201

Multiple choice 2D Arrays
Given the following: double[][] something = { {2.5, 6.8, 8.3, 2.3, 0.0}, {6.1, 10.2, 1.3, - 2.5, - 9.9}, {1.1, 2.3, 5.8, 13.21, 34.55} }; We want to replace the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 202

Multiple choice 2D Arrays
Given the following: String[][] poem = { {"I", "am", "the", "cookie", "monster."}, {"Would", "you", "like", "a", "cookie?"}, {"COOOOKIE", "OM", "NOM", "NOM",…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 203

Multiple choice 2D Arrays
Consider the following code segment, which is intended to create and initialize the 2D array words where the length of each word corresponds to the product of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 204

Multiple choice 2D Arrays
Consider the following code segment, which is intended to display the word boards. String[][] twoLetters = {{"ab", "ac", "ad", "ar", "af"}, {"bo", "be", "bi",…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 205

Multiple choice 2D Arrays
Consider the following code segment: int[][] nums = new int[5][5]; for (int i = 0;i< nums.length;i++) { for (int j =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 206

Multiple choice 2D Arrays
Consider the following code segment: String[][] word = {{"DOE", "A", "DEER"}, {"A", "FEMALE", "DEER"}, {"RAY", "A", "DROP"}, {"OF", "GOLDEN", "SUN"}}; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 207

Multiple choice 2D Arrays
Consider the following code segment: int[][] arr = {{10, 9, 8}, {7, 6, 5}, {4, 3, 2}}; for (int row = 0;row < arr.length;row++) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 208

Multiple choice 2D Arrays
Consider the following method, sumTo10, that traverses a 2D array checking to see if the sum of all integers in each array are equal to 10. The method will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 209

Multiple choice 2D Arrays
Which of the following traversals would print all of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 210

Multiple choice 2D Arrays
Which of the following traversals would print all of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 201 of 1,079
Page 21 of 108