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,451–2,460 of 3,140
  1. 2451
  2. 2452
  3. 2453
  4. 2454
  5. 2455
  6. 2456
  7. 2457
  8. 2458
  9. 2459
  10. 2460

Question 2451

Free response Unit 4: Data Collections
Consider the problem of keeping track of the available seats in a theater. Theater seats can be represented with a two-dimensional array of integers, where a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2452

Multiple choice Unit 4: Data Collections
public class Card { private String suit; private int value; //0 to 12 public Card(String cardSuit, int cardValue) {/* implementation */ } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2453

Multiple choice Unit 4: Data Collections
Refer to the following method that finds the smallest value in an array. /** Precondition: arr is an array of nonzero length * and is initialized with int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2454

Multiple choice Unit 4: Data Collections
When will method whatIsIt cause a stack overflow (i.e., cause computer memory to be exhausted)?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2455

Multiple choice Unit 4: Data Collections
The boolean expression a[i] == max…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2456

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 2457

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 2458

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 2459

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 2460

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 2,451 of 3,140
Page 246 of 314