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,591–2,600 of 3,140
  1. 2591
  2. 2592
  3. 2593
  4. 2594
  5. 2595
  6. 2596
  7. 2597
  8. 2598
  9. 2599
  10. 2600

Question 2591

Multiple choice Unit 4: Data Collections
Consider the following method: public int mysteryCount(int[] p) { int count = 0; for (int i = 0; i < p.length; i++) { count++; int j…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2592

Free response Unit 4: Data Collections
Seats in a movie theater are modeled by a two-dimensional array of boolean values: true represents an occupied seat and false represents a vacant seat. Row…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2593

Multiple choice Unit 4: Data Collections
Given the following code, which of the answers best describes the conditions needed for temp to be true, when it is returned?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2594

Multiple choice Unit 4: Data Collections
Consider the following code segment: List<String> list = new ArrayList<String>(); list.add("a"); list.add("b"); list.set(1, "c");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2595

Multiple choice Unit 4: Data Collections
The following incomplete method is intended to sort the array a in ascending order. public void sort() { int maxCompare = a.length - 1; int lIndex = 0; int temp…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2596

Free response Unit 4: Data Collections
A crossword puzzle grid is a two-dimensional rectangular array of black and white squares. Some of the white squares are labeled with a positive number…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2597

Multiple choice Unit 4: Data Collections
Given the following method, what would the result be when m is executed? public void m(int[][] p) { int height = p.length; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2598

Multiple choice Unit 4: Data Collections
What is the output from mystery(4321) when mystery is defined as follows? // preconditions: x >= 0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2599

Multiple choice Unit 4: Data Collections
Which of the following correctly shows the iterations of an ascending (from…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2600

Multiple choice Unit 4: Data Collections
Consider the following code segment: public static boolean check(String s) { return s.length() >= 2 && (s.substring(0,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,591 of 3,140
Page 260 of 314