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.

Subtopic: Arrays Clear filter

Questions 201–210 of 341
  1. 201
  2. 202
  3. 203
  4. 204
  5. 205
  6. 206
  7. 207
  8. 208
  9. 209
  10. 210

Question 201

Multiple choice Arrays
What is printed? int[] arr={2,25,7,28,9} for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 202

Multiple choice Arrays
What does nums contain afterward?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 203

Multiple choice Arrays
For one outer-loop iteration at a given i, how many inner-loop body…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 204

Multiple choice Arrays
For a nonempty array,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 205

Multiple choice Arrays
Which counts nonnull strings containing lowercase e, including e…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 206

Multiple choice Arrays
Which prints the corresponding name and score for every player whose score is strictly above high?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 207

Multiple choice Arrays
Return a new array without modifying arr. Values>750 become1000; values public int[] replaceHighAndLow(int[] arr) { int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 208

Multiple choice Arrays
In a hypothetical programming model, flag each RSI input strictly greater than70 as true and every other value as false. Return a new boolean array. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 209

Multiple choice Arrays
Return arraySize random even integers in[0,range] inclusive. Assume arraySize≥0 and0≤range≤1000000. Which replacement for /* missing */ makes the method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 210

Multiple choice Arrays
Consider the following code segment: int[] a = {0, 1}; int[] b = a; a[0] = 1; b[0] = 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 201 of 341
Page 21 of 35