Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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,341–2,350 of 2,811
  1. 2341
  2. 2342
  3. 2343
  4. 2344
  5. 2345
  6. 2346
  7. 2347
  8. 2348
  9. 2349
  10. 2350

Question 2341

Multiple choice Unit 4: Data Collections
Consider the following method: private int product(int n) { if (n <= 1) return 1; else return n * product(n - 2); }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2342

Multiple choice Unit 4: Data Collections
Consider the following method: /** * Rearranges the elements in words according to the values stored in an integer array indices, * so that the element of words…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2343

Multiple choice Unit 4: Data Collections
Given two arrays of double values sorted in ascending order, one with 100 elements and the other with 10 elements, how many…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2344

Multiple choice Unit 4: Data Collections
Consider the following code segment, intended to find the position of an integer targetValue in int[] a.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2345

Multiple choice Unit 4: Data Collections
Consider the following method, intended to use Binary Search to find the location of target within ArrayList<String> a. public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2346

Multiple choice Unit 4: Data Collections
Consider the following two implementations of the method getValue(double[] c, int n, double x) that computes and returns the value of…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2347

Multiple choice Unit 4: Data Collections
What is printed as a result of executing the following code segment? ArrayList<String> digits = new ArrayList<String>(); for (int k = 0; k <= 9; k++)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2348

Multiple choice Unit 4: Data Collections
A class Turtle has a void method forward(int d) that moves the turtle forward by d units. A class TurtleRace has a list of Turtle objects: private…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2349

Multiple choice Unit 4: Data Collections
If the classes House and HouseForSale compile with no errors,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2350

Multiple choice Unit 4: Data Collections
Which of the following code segments correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,341 of 2,811
Page 235 of 282