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,981–1,990 of 2,811
  1. 1981
  2. 1982
  3. 1983
  4. 1984
  5. 1985
  6. 1986
  7. 1987
  8. 1988
  9. 1989
  10. 1990

Question 1981

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 1982

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 1983

Multiple choice Unit 4: Data Collections
Using inclusive bounds and floor midpoint, how many midpoint…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1984

Multiple choice Unit 4: Data Collections
Return the count of even integers, including 0. Which replacement for /* missing */ makes the method meet its specification for all valid inputs? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1985

Multiple choice Unit 4: Data Collections
For a nonempty array whose maximum-minus-minimum fits in int, return that difference. Which replacement for /* missing */ makes the method meet its…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1986

Multiple choice Unit 4: Data Collections
Return the centered average: remove exactly one smallest and one largest occurrence, then use integer division. Length≥3; sum fits in int. Which replacement for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1987

Multiple choice Unit 4: Data Collections
Sum values, excluding every 13 and any value immediately after a13; empty input gives0. Sum fits in int. Which replacement for /* missing */ makes the method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1988

Multiple choice Unit 4: Data Collections
Sum the array except sections starting at a6 and ending at the next7 inclusive. Every 6 has a later7. Sum fits in int. Which replacement for /* missing */ makes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1989

Multiple choice Unit 4: Data Collections
Return true if a2 is adjacent to another2. Which replacement for /* missing */ makes the method meet its specification for all valid inputs? public boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1990

Multiple choice Unit 4: Data Collections
Return true if there are no 1s and no 3s. Which replacement for /* missing */ makes the method meet its specification for all valid inputs?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,981 of 2,811
Page 199 of 282