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,061–2,070 of 3,140
  1. 2061
  2. 2062
  3. 2063
  4. 2064
  5. 2065
  6. 2066
  7. 2067
  8. 2068
  9. 2069
  10. 2070

Question 2061

Multiple choice Unit 4: Data Collections
What is arr after mystery()? private int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2062

Multiple choice Unit 4: Data Collections
For a nonempty int array arr, arr[0]!=arr[i] for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2063

Multiple choice Unit 4: Data Collections
Sort [10,40,50,30,20,60] in descending order using insertion sort.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2064

Multiple choice Unit 4: Data Collections
Which loop throws ArrayIndexOutOfBoundsException…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2065

Multiple choice Unit 4: Data Collections
Which code actually adds 5 to every array element? I int[] numbers={1,2,3,4}; for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2066

Multiple choice Unit 4: Data Collections
The method should return true if target appears anywhere in arr. Which statement is true? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2067

Multiple choice Unit 4: Data Collections
What happens when the code is compiled and run? int[] highTemp={88,92,94,90,88,83} int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2068

Multiple choice Unit 4: Data Collections
For a nonempty array, does shiftRight rotate every element one position right, wrapping the last to the first? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2069

Multiple choice Unit 4: Data Collections
For nums={4,4,7,7}, the method from 2558 is repaired by starting i=0 and looping while i<nums.length−1. How many equality tests occur before it returns? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2070

Multiple choice Unit 4: Data Collections
Which loop does NOT print every…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,061 of 3,140
Page 207 of 314