Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice 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,611–2,620 of 3,140
  1. 2611
  2. 2612
  3. 2613
  4. 2614
  5. 2615
  6. 2616
  7. 2617
  8. 2618
  9. 2619
  10. 2620

Question 2611

Free response Unit 4: Data Collections
In an International ballroom dancing competition, competitors are scored by a panel of judges on a scale from 0 to 100. The final score for each couple is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2612

Free response Unit 4: Data Collections
In chess, a queen can move vertically, horizontally, and diagonally on an 8-by-8 chessboard. The picture below shows all the positions on the board that a queen…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2613

Multiple choice Unit 4: Data Collections
int len = 4; int[][] matrix = new int[len][len]; int total = 0; for (int row = 0; row < len; row++) { total = total + matrix[row][1]; } Assume…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2614

Multiple choice Unit 4: Data Collections
Consider the following Java class field and method: private List<Integer> list; public void mystery(int n) { for (int i = 0; i < n; i++) { Object obj =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2615

Multiple choice Unit 4: Data Collections
Consider the following method: public static int recur(int n) { if (n <= 1) return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2616

Multiple choice Unit 4: Data Collections
Consider the execution of the following Java code, which manipulates an ArrayList of strings: List<String> list = new ArrayList<String>(); list.add("a");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2617

Multiple choice Unit 4: Data Collections
Given the following method public void m(int[][] p) { int height = p.length; for (int row = 0;row < height / 2;row++) { for (int col =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2618

Multiple choice Unit 4: Data Collections
Given the following recursive method: // precondition: x >= 0 public static void mystery(int x) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2619

Multiple choice Unit 4: Data Collections
Given the following method: boolean temp = false; int count = 0; for (int testval : a) { if (testval == val) count++; } temp…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2620

Multiple choice Unit 4: Data Collections
Given the following partial implementation of a sorting algorithm: public static void sort(int[] a) { int maxCompare = a.length - 1; int savedIndex = 0; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,611 of 3,140
Page 262 of 314