Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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 121–130 of 1,222
  1. 121
  2. 122
  3. 123
  4. 124
  5. 125
  6. 126
  7. 127
  8. 128
  9. 129
  10. 130

Question 121

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 122

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 123

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 124

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 125

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 126

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 127

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 128

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 129

Multiple choice Sorting And Searching
How does a standard…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 130

Multiple choice Sorting And Searching
True or false: linear search becomes…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 121 of 1,222
Page 13 of 123