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 641–650 of 1,079
  1. 641
  2. 642
  3. 643
  4. 644
  5. 645
  6. 646
  7. 647
  8. 648
  9. 649
  10. 650

Question 641

Multiple choice Recursion
What is the output from mystery(4321) when mystery is defined as follows? // preconditions: x >= 0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 642

Multiple choice Sorting And Searching
Which of the following correctly shows the iterations of an ascending (from…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 643

Multiple choice Recursion
Consider the following code segment: public static boolean check(String s) { return s.length() >= 2 && (s.substring(0,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 644

Multiple choice Arrays
Consider the following code segment: public static void test(int[] a, int y) { if (a.length > 1) a[1] = a[1] * 2; y…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 645

Multiple choice 2D Arrays
A two-dimensional array is used to represent a matrix. The declaration is below: private int[][] matrix = new int[2][3]; public static void changeMatrix(int[][]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 646

Multiple choice Recursion
What is printed when the following main method is executed? public class Searcher { private int[] arr = {1, 3, 5, 8, 9}; public int mystery(int low, int high,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 647

Multiple choice Recursion
Consider the following method. What value is returned from a call of mystery(5)?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 648

Multiple choice Sorting And Searching
Which of the following correctly shows the iterations of an ascending (from…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 649

Multiple choice Arrays
Given the following method: public static int test(int[] a, int v) { for (int i = 0; i < a.length;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 650

Multiple choice Recursion
Given the following code: public static int mystery(String str) { if (str.length() == 0) return 1; else { if (str.substring(0,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 641 of 1,079
Page 65 of 108