Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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 681–690 of 1,222
  1. 681
  2. 682
  3. 683
  4. 684
  5. 685
  6. 686
  7. 687
  8. 688
  9. 689
  10. 690

Question 681

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 682

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 683

Free response Arraylists
This question involves the process of taking a list of words, called wordList, and producing a formatted string of a specified length. The list wordList…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 684

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 685

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 686

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 687

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 688

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 689

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 690

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 681 of 1,222
Page 69 of 123