Verityprep
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.

Questions 151–160 of 1,222
  1. 151
  2. 152
  3. 153
  4. 154
  5. 155
  6. 156
  7. 157
  8. 158
  9. 159
  10. 160

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.

Question 151 of 1,222
Page 16 of 123