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,811–1,820 of 2,811
  1. 1811
  2. 1812
  3. 1813
  4. 1814
  5. 1815
  6. 1816
  7. 1817
  8. 1818
  9. 1819
  10. 1820

Question 1811

Multiple choice Unit 4: Data Collections
Consider the following method, isSorted, which is intended to return true if an array of integers is sorted in nondecreasing order and to return false…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1812

Multiple choice Unit 4: Data Collections
Consider the following incomplete method that is intended to return an array that contains the contents of its first array parameter followed by the contents of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1813

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[] arr = {1, 2, 3, 4, 5, 6, 7}; for (int k = 3; k < arr.length - 1; k++)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1814

Multiple choice Unit 4: Data Collections
Consider the following method. public static void arrayMethod(int nums[]) { int j = 0; int k = nums.length - 1; while (j < k) { int x =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1815

Multiple choice Unit 4: Data Collections
Consider the following method, which is intended to return the element of a 2-dimensional array that is closest in value to a specified number, val. /** @return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1816

Multiple choice Unit 4: Data Collections
Consider the following instance variable and method. private List<String> animals; public void manipulate() { for (int k = animals.size() - 1; k > 0; k--) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1817

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[] oldArray = {1, 2, 3, 4, 5, 6, 7, 8, 9}; int[][] newArray = new int[3][3]; int row = 0; int col = 0; for (int value :…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1818

Multiple choice Unit 4: Data Collections
Assume that the array arr has been defined and initialized as follows. int[] arr = /* initial values for the array */ ; Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1819

Multiple choice Unit 4: Data Collections
Consider the following method. public void mystery(int[] data) { for (int k = 0; k < data.length - 1; k++) data[k + 1] = data[k] + data[k + 1]; } The following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1820

Multiple choice Unit 4: Data Collections
Consider the following recursive method. public int recur(int n) { if (n <= 10) return n * 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,811 of 2,811
Page 182 of 282