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 2,001–2,010 of 2,811
  1. 2001
  2. 2002
  3. 2003
  4. 2004
  5. 2005
  6. 2006
  7. 2007
  8. 2008
  9. 2009
  10. 2010

Question 2001

Multiple choice Unit 4: Data Collections
Return true if a1 has a2 somewhere later. 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 2002

Multiple choice Unit 4: Data Collections
Return true if any three adjacent values are all even or all odd. Which replacement for /* missing */ makes the method meet its specification for all valid…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2003

Multiple choice Unit 4: Data Collections
Return true if exactly three3s occur and no two are adjacent. 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 2004

Multiple choice Unit 4: Data Collections
Return true if every 2 has another2 immediately before or after it. Which replacement for /* missing */ makes the method meet its specification for all valid…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2005

Multiple choice Unit 4: Data Collections
For 0≤len≤nums.length, return whether the first len values equal the last len values in the same order. Which replacement for /* missing */ makes the method…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2006

Multiple choice Unit 4: Data Collections
Return true if an adjacent triple increases by exactly1 each time. Arithmetic is within int range. 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 2007

Multiple choice Unit 4: Data Collections
For end≥start, return the integers from start inclusive to end exclusive. The length fits in int. 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 2008

Multiple choice Unit 4: Data Collections
Rotate left by one; empty input remains empty. Which replacement for /* missing */ makes the method meet its specification for all valid inputs? public int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2009

Multiple choice Unit 4: Data Collections
Propagate each encountered multiple of 10 through later nonmultiples until another multiple of 10 is reached. Which replacement for /* missing */ makes the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2010

Multiple choice Unit 4: Data Collections
The nonempty array contains a4. Return a new array of all elements before the first 4. 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 2,001 of 2,811
Page 201 of 282