Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions unit by unit, 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 2,281–2,290 of 2,811
  1. 2281
  2. 2282
  3. 2283
  4. 2284
  5. 2285
  6. 2286
  7. 2287
  8. 2288
  9. 2289
  10. 2290

Question 2281

Multiple choice Unit 4: Data Collections
Which condition completes ascending insertion sort? public void insertionSort(int[] arr) { for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2282

Multiple choice Unit 4: Data Collections
Return true exactly when an ArrayList of nonnull Integers is strictly increasing. Empty and singleton lists qualify. Which replacement for /* missing */ makes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2283

Multiple choice Unit 4: Data Collections
Count empty lockers. All Locker references are nonnull, and isInUse reports whether a locker is occupied. Which replacement for /* missing */ makes the method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2284

Multiple choice Unit 4: Data Collections
Consider the following code segment. int n = // some positive integer int [ ][ ] table = new int[n][n]; // input values into table int sum = 0; for (int row =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2285

Multiple choice Unit 4: Data Collections
Consider the following code segment. int m = // some positive integer int n = // some positive integer int [ ][ ] table = new int[m][n]; // input values into…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2286

Multiple choice Unit 4: Data Collections
Consider the following incomplete method. public static double findRowSum(double [][] mat, int n) { double sum = 0; // missing code return sum; } Method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2287

Multiple choice Unit 4: Data Collections
Consider the following definition and code segment. int [][] table = new int[5][5]; for (int row = 0; row < table.length-1; row++) for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2288

Multiple choice Unit 4: Data Collections
What does puzzle(10) return?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2289

Multiple choice Unit 4: Data Collections
What happens when mystery(11) is called using Java int arithmetic?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2290

Multiple choice Unit 4: Data Collections
What does enigma(9) return?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,281 of 2,811
Page 229 of 282