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
Question 141
Multiple choice
Arrays
The nonempty int array may contain any int values. Which initializers always make findMin correct? I: Integer.MAX_VALUE.…
Sign up now. It's free!
See the full question with its answer and worked solution.
Which describes ascending…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 143
Multiple choice
Arrays
What is arr after mystery()? private int[]…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 144
Multiple choice
Arrays
For a nonempty int array arr, arr[0]!=arr[i] for…
Sign up now. It's free!
See the full question with its answer and worked solution.
Sort [10,40,50,30,20,60] in descending order using insertion sort.…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 146
Multiple choice
Arrays
Which loop throws ArrayIndexOutOfBoundsException…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 147
Multiple choice
Arrays
Which code actually adds 5 to every array element? I int[] numbers={1,2,3,4}; for(int…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 148
Multiple choice
Arrays
The method should return true if target appears anywhere in arr. Which statement is true? public…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 149
Multiple choice
Arrays
What happens when the code is compiled and run? int[] highTemp={88,92,94,90,88,83} int…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 150
Multiple choice
Arrays
For a nonempty array, does shiftRight rotate every element one position right, wrapping the last to the first? public…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 15 of 123
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.