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,241–2,250 of 2,811
  1. 2241
  2. 2242
  3. 2243
  4. 2244
  5. 2245
  6. 2246
  7. 2247
  8. 2248
  9. 2249
  10. 2250

Question 2241

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[][] mat = {{3,4,5}, {6,7,8}}; int sum = 0; for (int[] arr: mat) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2242

Multiple choice Unit 4: Data Collections
Consider a Clown class that has a default constructor. Suppose a list ArrayList<Clown> list is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2243

Multiple choice Unit 4: Data Collections
public class Tester { private int[] testArray = {3, 4, 5}; /** @param n an int to be incremented by 1 */ public void increment (int n) { n++; } public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2244

Multiple choice Unit 4: Data Collections
public class Tester { private int[] testArray = {3, 4, 5}; /** @param n an int to be incremented by 1 */ public void increment (int n) { n++; } public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2245

Multiple choice Unit 4: Data Collections
Refer to the doSomething method below. // postcondition public static void doSomething(ArrayList<SomeType> list, int i, int j) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2246

Multiple choice Unit 4: Data Collections
Consider the following method. public static void whatsIt(int n) { if (n > 10) { whatsIt(n /…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2247

Multiple choice Unit 4: Data Collections
A large list of numbers is to be sorted into ascending order. Assuming that a "data movement" is a swap or…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2248

Multiple choice Unit 4: Data Collections
Refer to the following class containing the mystery method. public class SomeClass { private int[] arr; /** Constructor. Initializes arr to contain nonnegative…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2249

Multiple choice Unit 4: Data Collections
public class Searcher { private int[] arr; /** Constructor. Initializes arr with integers. */ public Searcher() { /* implementation not shown */ } /**…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2250

Multiple choice Unit 4: Data Collections
public class Searcher { private int[] arr; /** Constructor. Initializes arr with integers. */ public Searcher() { /* implementation not shown */ } /**…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,241 of 2,811
Page 225 of 282