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,641–2,650 of 3,140
  1. 2641
  2. 2642
  3. 2643
  4. 2644
  5. 2645
  6. 2646
  7. 2647
  8. 2648
  9. 2649
  10. 2650

Question 2641

Multiple choice Unit 4: Data Collections
Consider the following method: public static void test(int[] a, int y) { if (a.length > 1) { a[1] = a[1] * 2; y = y *…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2642

Multiple choice Unit 4: Data Collections
The following method should sort the contents of the array in ascending order using insertion sort. Which of the following should replace /* missing code */ to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2643

Multiple choice Unit 4: Data Collections
Consider the following recursive method: // precondition: x >= 0 public static void mystery(int x) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2644

Free response Unit 4: Data Collections
This question involves the manipulation and analysis of a list of words. The following WordChecker class contains an ArrayList<String> to be analyzed and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2645

Free response Unit 4: Data Collections
This question involves a path through a two-dimensional (2D) array of integers, where the path is based on the values of elements in the array. When an element…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2646

Free response Unit 4: Data Collections
WordList stores strings of letters in myList. Implement both methods while preserving the order of words that remain. public class WordList { private ArrayList…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2647

Free response Unit 4: Data Collections
Hotel maintains rooms numbered0 through rooms.length−1 and a waiting list of guest names. A null rooms entry is unreserved; any nonnull entry is a Reservation…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2648

Free response Unit 4: Data Collections
StudentRecord holds more than one integer score. Scores have improved if every successive score is at least the preceding score. Improved records average only…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2649

Free response Unit 4: Data Collections
An appointment scheduler uses TimeInterval.overlapsWith to determine overlap. Appointment exposes its TimeInterval. DailySchedule stores a list of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2650

Free response Unit 4: Data Collections
Customers have a name and positive unique ID and are ordered by name, then ID. Implement a comparison and a two-pass intersection of sorted customer arrays.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,641 of 3,140
Page 265 of 314