Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 611–620 of 1,079
  1. 611
  2. 612
  3. 613
  4. 614
  5. 615
  6. 616
  7. 617
  8. 618
  9. 619
  10. 620

Question 611

Multiple choice Sorting And Searching
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 612

Multiple choice Arrays
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 613

Multiple choice Sorting And Searching
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 614

Multiple choice Arrays
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 615

Multiple choice Arraylists
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 616

Multiple choice Arraylists
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 617

Multiple choice Arrays
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 618

Multiple choice 2D Arrays
Which of the following code segments correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 619

Multiple choice Arraylists
Consider the following method intended to remove all elements with a value less than zero from an ArrayList<Integer>: public void…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 620

Multiple choice Arrays
Consider the following code segment: int[] arr = {1, 2, 3, 4, 5, 6, 7, 8}; for (int k = 1; k <= 6; k += 2) { arr[7] = arr[k]; arr[k]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 611 of 1,079
Page 62 of 108