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,251–2,260 of 3,140
  1. 2251
  2. 2252
  3. 2253
  4. 2254
  5. 2255
  6. 2256
  7. 2257
  8. 2258
  9. 2259
  10. 2260

Question 2251

Multiple choice Unit 4: Data Collections
What occurs for a nonempty int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2252

Multiple choice Unit 4: Data Collections
arr1 initially contains [0,6,0,4,0,0,2]. What does…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2253

Multiple choice Unit 4: Data Collections
Assume k≥2 and arr.length>k. What is the maximum…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2254

Multiple choice Unit 4: Data Collections
What will be output from the following code segment, assuming it is in the same class as the doSomething method? int[] arr = {1, 2, 3, 4}; doSomething(arr);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2255

Multiple choice Unit 4: Data Collections
A program reads an unknown number of text-file…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2256

Multiple choice Unit 4: Data Collections
For intensive calculations over a fixed-size list of numeric values,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2257

Multiple choice Unit 4: Data Collections
Assume every list element is a nonnull Address. Which statement in the enhanced loop prints each name? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2258

Multiple choice Unit 4: Data Collections
Every element of Address[] list is nonnull. Address has no overridden toString. Which replacement prints each full mailing address using the accessors? I uses…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2259

Multiple choice Unit 4: Data Collections
All Student entries and their Address fields are nonnull. Which statement in the loop prints each student’s name? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2260

Multiple choice Unit 4: Data Collections
For a nonempty Student array of nonnull entries, which locate bodies always return a student with maximum idNum? public class Address { private String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,251 of 3,140
Page 226 of 314