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

Question 871

Multiple choice Arraylists
ArrayList<String> list = null;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 872

Multiple choice Arraylists
ArrayList<String> list = new ArrayList<String>();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 873

Multiple choice Arraylists
ArrayList<String> list = new ArrayList<String>();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 874

Multiple choice 2D Arrays
int[][] arr = new int[2][3];…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 875

Multiple choice 2D Arrays
int[][] arr = new int[2][3];…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 876

Multiple choice Arrays
public static int countNull(String[] arr) { int count = 0; for (int i = 0;i < arr.length;i++) { if (arr[i] == null) { count++; } } return count; } String[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 877

Multiple choice Arrays
Consider the following method: public static int countWordNull(String[] arr) { int count = 0; for (int i = 0; i < arr.length; i++) { if (arr[i].equals("null"))…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 878

Multiple choice Arrays
public static int countSpecial(String[] arr) { int count = 0; for (int i = 0;i < arr.length;i++) { if (arr[i] == null || arr[i].equals("")) { count++; } }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 879

Multiple choice 2D Arrays
public static int countWordNull(String[][] arr) { int count = 0; for (int r = 0;r < arr.length;r++) { for (int c = 0;c < arr[r].length;c++) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 880

Multiple choice Recursion
public static int calculateValue(int n) { if (n <= 1) { return 1; } return n *…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 871 of 1,079
Page 88 of 108