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 151
Multiple choice
Arrays
For nums={4,4,7,7}, the method from 2558 is repaired by starting i=0 and looping while i<nums.length−1. How many equality tests occur before it returns? public…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 152
Multiple choice
Arrays
Which loop does NOT print every…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 153
Multiple choice
Arrays
Which initializes a boolean array of three elements all containing true? I: boolean[] arr={true, true,…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 154
Multiple choice
Arrays
What is printed? int[] nums={1,2,3,4,5,6} int count=0…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 155
Multiple choice
Arrays
Which correctly replaces Carrot and Lettuce with Grape and Blueberry?…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 156
Multiple choice
Arrays
How do you initialize an int array…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 157
Multiple choice
Arrays
Which initializes a double array…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 158
Multiple choice
Arrays
What is the last valid index…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 159
Multiple choice
Arrays
What is printed? int x=25 int[] numArray=new int[x] x=100…
Sign up now. It's free!
See the full question with its answer and worked solution.
Question 160
Multiple choice
Arrays
Which declares myScore from the THIRD scores…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 16 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.