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 781–790 of 1,079
  1. 781
  2. 782
  3. 783
  4. 784
  5. 785
  6. 786
  7. 787
  8. 788
  9. 789
  10. 790

Question 781

Multiple choice Recursion
What does mystery(6) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 782

Multiple choice Recursion
What does mystery(10) return? public int mystery(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 783

Multiple choice Recursion
Which recursive definitions match a loop that sums integers x through 1, for every x >= 0? Assume no integer overflow. // I:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 784

Multiple choice Recursion
What does mystery(30,18) return? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 785

Multiple choice Recursion
Which replacement makes mystery(10)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 786

Multiple choice Arrays
What is printed? int result=0;int[] a={1,2,3,4,5} for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 787

Multiple choice Arrays
What are the final array contents?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 788

Multiple choice Arrays
What is count after the loop? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 789

Multiple choice Arrays
What are the final array and sum? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 790

Multiple choice Arrays
For a nonempty array, what does this method return? public int mystery(int[] a){ int m=-1,index=0; for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 781 of 1,079
Page 79 of 108