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,191–2,200 of 3,140
  1. 2191
  2. 2192
  3. 2193
  4. 2194
  5. 2195
  6. 2196
  7. 2197
  8. 2198
  9. 2199
  10. 2200

Question 2191

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 2192

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 2193

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 2194

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 2195

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 2196

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 2197

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 2198

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 2199

Multiple choice Unit 4: Data Collections
The nonempty array contains a4. Return a new array of all elements after the last 4. Which replacement for /* missing */ makes the method meet its specification…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2200

Multiple choice Unit 4: Data Collections
An interior val is alone when both neighbors differ from val. Replace each such occurrence with the larger neighbor. Which replacement for /* missing */ makes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,191 of 3,140
Page 220 of 314