Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 531–540 of 1,079
  1. 531
  2. 532
  3. 533
  4. 534
  5. 535
  6. 536
  7. 537
  8. 538
  9. 539
  10. 540

Question 531

Multiple choice Arrays
Which correctly counts even array VALUES? I tests i%2==0 for every index. II tests arr[i]%2==0 for every index. III tests arr[i]%2==0 only for even indices. I…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 532

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 533

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 534

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 535

Multiple choice Arrays
For a nonempty array,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 536

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 537

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 538

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 539

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 540

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 531 of 1,079
Page 54 of 108