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 1,751–1,760 of 2,811
  1. 1751
  2. 1752
  3. 1753
  4. 1754
  5. 1755
  6. 1756
  7. 1757
  8. 1758
  9. 1759
  10. 1760

Question 1751

Multiple choice Unit 4: Data Collections
Consider the following method. public static void showMe(int arg) { if (arg < 10) { showMe(arg +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1752

Multiple choice Unit 4: Data Collections
Consider the following method. /** Precondition: values has at least one row */ public static int calculate(int[][] values) { int found = values[0][0]; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1753

Multiple choice Unit 4: Data Collections
Consider the following method. /** Precondition: arr.length > 0 */ public static int mystery(int[] arr) { int index = 0; int count = 0; int m = -1; for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1754

Multiple choice Unit 4: Data Collections
Consider the following recursive method. public static void whatsItDo(String str) { int len = str.length(); if (len > 1) { String temp…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1755

Multiple choice Unit 4: Data Collections
Consider the following definition. int[][] numbers = {{1, 2, 3}, {4, 5,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1756

Multiple choice Unit 4: Data Collections
Consider the following code segment from an insertion sort program. for (int j = 1; j < arr.length; j++) { int insertItem = arr[j]; int k = j - 1; while (k >= 0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1757

Multiple choice Unit 4: Data Collections
Questions refer to the following information. Consider the following sort method. This method correctly sorts the elements of array data into increasing order.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1758

Multiple choice Unit 4: Data Collections
Consider the following sort method. This method correctly sorts the elements of array data into increasing order. public static void sort(int[] data) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1759

Multiple choice Unit 4: Data Collections
Consider the following recursive method. /** Precondition: num >= 0 */ public static int what(int num) { if (num < 10) { return 1; } else { return 1 + what(num…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1760

Multiple choice Unit 4: Data Collections
Consider the following code segment. String[][] board = new String[5][5]; for (int row = 0; row < 5; row++) { for (int col = 0; col < 5; col++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,751 of 2,811
Page 176 of 282