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,251–2,260 of 2,811
  1. 2251
  2. 2252
  3. 2253
  4. 2254
  5. 2255
  6. 2256
  7. 2257
  8. 2258
  9. 2259
  10. 2260

Question 2251

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 2252

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 2253

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 2254

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 2255

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 2256

Multiple choice Unit 4: Data Collections
Consider a program that has a two-dimensional array mat of int values. The program has several methods that change mat by reflecting elements of mat across a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2257

Multiple choice Unit 4: Data Collections
A word creation game uses a set of small letter tiles, all of which are initially in a tile bag. A partial implementation of a TileBag class is shown below.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2258

Multiple choice Unit 4: Data Collections
A word creation game uses a set of small letter tiles, all of which are initially in a tile bag. A partial implementation of a TileBag class is shown below.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2259

Multiple choice Unit 4: Data Collections
Consider a method partialProd that returns an integer array prod such that for all k, prod[k] is equal to arr[0] * arr[1] * ... * arr[k]. For example, if arr…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2260

Multiple choice Unit 4: Data Collections
What is printed? int number=13 int[] values={0,1,2,3,4,5}…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,251 of 2,811
Page 226 of 282