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,791–2,800 of 3,140
  1. 2791
  2. 2792
  3. 2793
  4. 2794
  5. 2795
  6. 2796
  7. 2797
  8. 2798
  9. 2799
  10. 2800

Question 2791

Multiple choice Unit 4: Data Collections
Consider the following 2D array: int[][] matrix = { {1, 2,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2792

Multiple choice Unit 4: Data Collections
Given the array int[] arr = {5, 10, 15, 20,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2793

Multiple choice Unit 4: Data Collections
What does sum(4) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2794

Multiple choice Unit 4: Data Collections
What is printed? java.util.ArrayList a=new java.util.ArrayList…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2795

Multiple choice Unit 4: Data Collections
A researcher wants to investigate which age group (under 18 years old, or 18 years old and over) is more likely to have downloaded a certain application from an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2796

Multiple choice Unit 4: Data Collections
Consider the following method, which is intended to return the maximum integer value contained in ranges. /** Precondition: ranges contains at least one…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2797

Multiple choice Unit 4: Data Collections
A text file named roster.txt has the following contents. Assume that the file contains no spaces. Cohen-Isabel Lee-Cindy Patel-Anisha Sanchez-Michael In the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2798

Multiple choice Unit 4: Data Collections
Consider the following method. public void reviseList(ArrayList<Integer> list) { for (int i = 0; i < list.size(); i++) { int temp = list.get(i); if (temp % 2 ==…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2799

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[][] arr2D = /* missing initialization */; int sum = 0; for (int j = 0; j < arr2D.length; j++) { sum +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2800

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[][] arr = {{10, -7, 19, 14}, {-3, -2, -6, 11}, {-9, 12, 10, -1}}; int ans = 1; for (int[] row : arr) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,791 of 3,140
Page 280 of 314