Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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 551–560 of 1,222
  1. 551
  2. 552
  3. 553
  4. 554
  5. 555
  6. 556
  7. 557
  8. 558
  9. 559
  10. 560

Question 551

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 552

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 553

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 554

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 555

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 556

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 557

Free response Arraylists
A text-editing program uses a Sentence class that manipulates a single sentence. A sentence contains letters, blanks, and punctuation. The first character in a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 558

Free response 2D Arrays
This question manipulates a two-dimensional array. In parts (a) and (b) you will write two methods of a Matrix class. In doing so, you will use the reverseArray…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 559

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 560

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 551 of 1,222
Page 56 of 123