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.

Subtopic: Arraylists Clear filter

Questions 21–30 of 173
  1. 21
  2. 22
  3. 23
  4. 24
  5. 25
  6. 26
  7. 27
  8. 28
  9. 29
  10. 30

Question 21

Multiple choice Arraylists
True or false: adding an int or double primitive value to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 22

Multiple choice Arraylists
What is printed? Assume ArrayList is imported. ArrayList array = new ArrayList () array.add(3);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 23

Multiple choice Arraylists
What is printed? Assume ArrayList is imported. ArrayList array = new ArrayList () array.add(3);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 24

Multiple choice Arraylists
What is printed? Assume ArrayList is imported. ArrayList names = new ArrayList () names.add("Michael"); names.add("Lebron") names.add("Serena");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 25

Multiple choice Arraylists
Which indexed loop accesses every existing element of a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 26

Multiple choice Arraylists
True or false: enhanced for loops…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 27

Multiple choice Arraylists
Will this method remove every multiple of 3? public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 28

Multiple choice Arraylists
Assume this method is inside a generic class with type parameter E. Which loop inserts element…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 29

Multiple choice Arraylists
When is standard insertion sort…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 30

Multiple choice Arraylists
How do you obtain the number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 21 of 173
Page 3 of 18