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 241–250 of 1,079
  1. 241
  2. 242
  3. 243
  4. 244
  5. 245
  6. 246
  7. 247
  8. 248
  9. 249
  10. 250

Question 241

Multiple choice Recursion
Given the following recursive method public static int sumDigits(int number) { if (number == 0) { return 0; } int thisDigit = number % 10; return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 242

Multiple choice Recursion
Given the following recursive method public static int sumDigits(int number) { if (number == 0) { return 0; } int thisDigit = number % 10; return thisDigit +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 243

Multiple choice Recursion
The following recursive method is designed to adjust letter grades for students receiving a B, C, or D. public String adjustGrades(String grades) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 244

Multiple choice Recursion
What is the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 245

Multiple choice Recursion
What is the base case…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 246

Multiple choice Recursion
Why do we…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 247

Multiple choice Recursion
Of the following problems, which one…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 248

Multiple choice Recursion
Given the following code, how many calls (including the original call) to the printX method would be made if we called…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 249

Multiple choice Arrays
When run() is invoked, what happens? public class SayHello { public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 250

Multiple choice 2D Arrays
Which is the correct way to construct and assign a 2D…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 241 of 1,079
Page 25 of 108