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,461–2,470 of 3,140
  1. 2461
  2. 2462
  3. 2463
  4. 2464
  5. 2465
  6. 2466
  7. 2467
  8. 2468
  9. 2469
  10. 2470

Question 2461

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 2462

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 2463

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 2464

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 2465

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 2466

Multiple choice Unit 4: Data Collections
Consider the following RandomList class. public class RandomList { private int[] ranList; public RandomList() { ranList = getList(); } /** @return array with…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2467

Multiple choice Unit 4: Data Collections
A matrix (two-dimensional array) is declared as int[][] mat = new int[2][3]; Consider the following method. public static void changeMatrix(int[][] mat) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2468

Multiple choice Unit 4: Data Collections
A programmer plans to write a program that simulates a small bingo game (no more than six players). Each player will have a bingo card with 20 numbers from 0 to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2469

Multiple choice Unit 4: Data Collections
A programmer plans to write a program that simulates a small bingo game (no more than six players). Each player will have a bingo card with 20 numbers from 0 to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2470

Multiple choice Unit 4: Data Collections
Consider method findSomething below. /** Precondition: a.length is equal to b.length. */ public static boolean findSomething(int[] a, int[] b) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,461 of 3,140
Page 247 of 314