Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Data Collections, 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 521–530 of 1,079
  1. 521
  2. 522
  3. 523
  4. 524
  5. 525
  6. 526
  7. 527
  8. 528
  9. 529
  10. 530

Question 521

Multiple choice Arrays
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 522

Multiple choice Arraylists
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 523

Multiple choice Arrays
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 524

Multiple choice 2D Arrays
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 525

Multiple choice Arraylists
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 526

Multiple choice Arraylists
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 527

Multiple choice Arrays
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 528

Multiple choice Arrays
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 529

Multiple choice Arrays
What is printed? int total=3 int[] values={8,6,4,-2}…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 530

Multiple choice Arrays
What is printed without separators?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 521 of 1,079
Page 53 of 108