Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 2,881–2,890 of 3,140
  1. 2881
  2. 2882
  3. 2883
  4. 2884
  5. 2885
  6. 2886
  7. 2887
  8. 2888
  9. 2889
  10. 2890

Question 2881

Multiple choice Unit 4: Data Collections
ArrayList<Integer> list = new…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2882

Multiple choice Unit 4: Data Collections
String[] arr = new String[3];…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2883

Multiple choice Unit 4: Data Collections
String[] arr = null; if (arr == null) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2884

Multiple choice Unit 4: Data Collections
ArrayList<String> list = null;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2885

Multiple choice Unit 4: Data Collections
ArrayList<String> list = new ArrayList<String>();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2886

Multiple choice Unit 4: Data Collections
ArrayList<String> list = new ArrayList<String>();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2887

Multiple choice Unit 4: Data Collections
int[][] arr = new int[2][3];…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2888

Multiple choice Unit 4: Data Collections
int[][] arr = new int[2][3];…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2889

Multiple choice Unit 4: Data Collections
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 2890

Multiple choice Unit 4: Data Collections
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 2,881 of 3,140
Page 289 of 314