Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Data Collections, 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 331–340 of 1,079
  1. 331
  2. 332
  3. 333
  4. 334
  5. 335
  6. 336
  7. 337
  8. 338
  9. 339
  10. 340

Question 331

Multiple choice Arrays
What occurs for a nonempty int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 332

Multiple choice Arrays
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 333

Multiple choice Arrays
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 334

Multiple choice Arrays
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 335

Multiple choice Arraylists
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 336

Multiple choice Arraylists
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 337

Multiple choice Arrays
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 338

Multiple choice Arrays
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 339

Multiple choice Arrays
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 340

Multiple choice Arrays
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 331 of 1,079
Page 34 of 108