Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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,601–2,610 of 2,811
  1. 2601
  2. 2602
  3. 2603
  4. 2604
  5. 2605
  6. 2606
  7. 2607
  8. 2608
  9. 2609
  10. 2610

Question 2601

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 2602

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 2603

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 2604

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 2605

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 2606

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 2607

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 2608

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 2609

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 2610

Multiple choice Unit 4: Data Collections
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 2,601 of 2,811
Page 261 of 282