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,101–2,110 of 3,140
  1. 2101
  2. 2102
  3. 2103
  4. 2104
  5. 2105
  6. 2106
  7. 2107
  8. 2108
  9. 2109
  10. 2110

Question 2101

Multiple choice Unit 4: Data Collections
What does scales contain afterward? ArrayList scales=new ArrayList () scales.add("DO"); scales.add("RE"); scales.add("MI") scales.add("FA"); scales.add("SO")…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2102

Multiple choice Unit 4: Data Collections
What is printed? ArrayList nums=new…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2103

Multiple choice Unit 4: Data Collections
What is printed? ArrayList list=new ArrayList () list.add("One"); list.add("Two");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2104

Multiple choice Unit 4: Data Collections
The method should return the matching string’s index or−1. Which repair is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2105

Multiple choice Unit 4: Data Collections
For nums=[1,2,4,3,4,5], what does search(nums,4) return? public int search(ArrayList list,int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2106

Multiple choice Unit 4: Data Collections
For [6,5,4,3,2,1], how often does the counted statement execute? public static…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2107

Multiple choice Unit 4: Data Collections
Which change makes this selection sort order values from greatest to smallest? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2108

Multiple choice Unit 4: Data Collections
How often does curIndex-- execute for insertionSort(new int[]{6,5,4,3,2,1})? public static int[] insertionSort(int[] arr) { for(int i=1;i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2109

Multiple choice Unit 4: Data Collections
A list is alphabetically sorted. To sort it in reverse alphabetical order, which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2110

Multiple choice Unit 4: Data Collections
An account list is already sorted by account value. One new account must be…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,101 of 3,140
Page 211 of 314