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.
All 1,222
Multiple choice 1,079
Free response 143
Subtopic: Arrays
Clear filter
Question 271
Multiple choice
Arrays
What is count after the loop? int[]…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 272
Multiple choice
Arrays
What are the final array and sum? int[]…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 273
Multiple choice
Arrays
For a nonempty array, what does this method return? public int mystery(int[] a){ int m=-1,index=0; for(int…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 274
Multiple choice
Arrays
What is printed? int[] arr={1,2,3,4,5};int[]…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 275
Multiple choice
Arrays
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 276
Multiple choice
Arrays
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 277
Multiple choice
Arrays
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 278
Multiple choice
Arrays
private int n; public boolean check(int[ ] arr) { boolean theCheck = true; for (int k = 0; k < n - 1; k++) { if (arr[k] >= arr[k+1]) theCheck =…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 279
Multiple choice
Arrays
private int n; public boolean check(int[ ] arr) { boolean theCheck = true; for (int k = 0; k < n - 1; k++) { if (arr[k] >= arr[k+1]) theCheck =…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 280
Multiple choice
Arrays
Consider the following incomplete method that is intended to determine if the corresponding elements of two parallel arrays are equal. // precondition:…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 28 of 35
Get your FRQs graded in the Student Portal
In the Verityprep Student Portal, answer the FRQs of AP practice and past exams by typing or uploading a photo. A teacher grades them with that year's official College Board scoring guidelines and gives you an estimated 1–5 score.
Join Verityprep now
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.