Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 1,971–1,980 of 2,811
  1. 1971
  2. 1972
  3. 1973
  4. 1974
  5. 1975
  6. 1976
  7. 1977
  8. 1978
  9. 1979
  10. 1980

Question 1971

Multiple choice Unit 4: Data Collections
The following recursive method is intended to return the number of occurrences of a word from a phrase. 1: public static int countWord(String phrase, String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1972

Multiple choice Unit 4: Data Collections
Given the following code: String number = "8735"; int sum = 0; for (int i = 0;i < number.length();i++) { sum +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1973

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 1974

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 1975

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 1976

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 1977

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 1978

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 1979

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 1980

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 1,971 of 2,811
Page 198 of 282