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,471–2,480 of 3,140
  1. 2471
  2. 2472
  3. 2473
  4. 2474
  5. 2475
  6. 2476
  7. 2477
  8. 2478
  9. 2479
  10. 2480

Question 2471

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 2472

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 2473

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 2474

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 2475

Free response Unit 4: Data Collections
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 2476

Free response Unit 4: Data Collections
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 2477

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 2478

Multiple choice Unit 4: Data Collections
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 2479

Multiple choice Unit 4: Data Collections
What is printed without separators?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2480

Multiple choice Unit 4: Data Collections
Which correctly counts even array VALUES? I tests i%2==0 for every index. II tests arr[i]%2==0 for every index. III tests arr[i]%2==0 only for even indices. I…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,471 of 3,140
Page 248 of 314