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 871–880 of 1,222
  1. 871
  2. 872
  3. 873
  4. 874
  5. 875
  6. 876
  7. 877
  8. 878
  9. 879
  10. 880

Question 871

Multiple choice Arrays
What is printed? int[] arr={1,2,3,4,5};int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 872

Multiple choice Arrays
What is printed? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 873

Multiple choice 2D Arrays
Consider the following 2D array: int[][] matrix = { {1, 2,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 874

Multiple choice Arrays
Given the array int[] arr = {5, 10, 15, 20,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 875

Multiple choice Recursion
What does sum(4) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 876

Multiple choice Arraylists
What is printed? java.util.ArrayList a=new java.util.ArrayList…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 877

Multiple choice Unit 4: Data Collections
A researcher wants to investigate which age group (under 18 years old, or 18 years old and over) is more likely to have downloaded a certain application from an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 878

Multiple choice Arrays
Consider the following method, which is intended to return the maximum integer value contained in ranges. /** Precondition: ranges contains at least one…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 879

Multiple choice Using Text Files
A text file named roster.txt has the following contents. Assume that the file contains no spaces. Cohen-Isabel Lee-Cindy Patel-Anisha Sanchez-Michael In the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 880

Multiple choice Arraylists
Consider the following method. public void reviseList(ArrayList<Integer> list) { for (int i = 0; i < list.size(); i++) { int temp = list.get(i); if (temp % 2 ==…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 871 of 1,222
Page 88 of 123