Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 2,161–2,170 of 3,140
  1. 2161
  2. 2162
  3. 2163
  4. 2164
  5. 2165
  6. 2166
  7. 2167
  8. 2168
  9. 2169
  10. 2170

Question 2161

Multiple choice Unit 4: Data Collections
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 2162

Multiple choice Unit 4: Data Collections
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 2163

Multiple choice Unit 4: Data Collections
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 2164

Multiple choice Unit 4: Data Collections
What is the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2165

Multiple choice Unit 4: Data Collections
What is the base case…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2166

Multiple choice Unit 4: Data Collections
Why do we…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2167

Multiple choice Unit 4: Data Collections
Of the following problems, which one…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2168

Multiple choice Unit 4: Data Collections
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 2169

Multiple choice Unit 4: Data Collections
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 2170

Multiple choice Unit 4: Data Collections
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 2,161 of 3,140
Page 217 of 314