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.

Subtopic: Arrays Clear filter

Questions 181–190 of 300
  1. 181
  2. 182
  3. 183
  4. 184
  5. 185
  6. 186
  7. 187
  8. 188
  9. 189
  10. 190

Question 181

Multiple choice Arrays
The boolean expression a[i] == max…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 182

Multiple choice Arrays
public class Tester { private int[] testArray = {3, 4, 5}; /** @param n an int to be incremented by 1 */ public void increment (int n) { n++; } public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 183

Multiple choice Arrays
public class Tester { private int[] testArray = {3, 4, 5}; /** @param n an int to be incremented by 1 */ public void increment (int n) { n++; } public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 184

Multiple choice Arrays
Refer to the following class containing the mystery method. public class SomeClass { private int[] arr; /** Constructor. Initializes arr to contain nonnegative…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 185

Multiple choice Arrays
Consider the following RandomList class. public class RandomList { private int[] ranList; public RandomList() { ranList = getList(); } /** @return array with…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 186

Multiple choice Arrays
A programmer plans to write a program that simulates a small bingo game (no more than six players). Each player will have a bingo card with 20 numbers from 0 to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 187

Multiple choice Arrays
Consider method findSomething below. /** Precondition: a.length is equal to b.length. */ public static boolean findSomething(int[] a, int[] b) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 188

Multiple choice Arrays
Consider a method partialProd that returns an integer array prod such that for all k, prod[k] is equal to arr[0] * arr[1] * ... * arr[k]. For example, if arr…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 189

Multiple choice Arrays
What is printed? int number=13 int[] values={0,1,2,3,4,5}…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 190

Multiple choice Arrays
What is printed? int total=3 int[] values={8,6,4,-2}…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 181 of 300
Page 19 of 30