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,781–2,790 of 3,140
  1. 2781
  2. 2782
  3. 2783
  4. 2784
  5. 2785
  6. 2786
  7. 2787
  8. 2788
  9. 2789
  10. 2790

Question 2781

Multiple choice Unit 4: Data Collections
What does mystery(30,18) return? public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2782

Multiple choice Unit 4: Data Collections
Which replacement makes mystery(10)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2783

Multiple choice Unit 4: Data Collections
What is printed? int result=0;int[] a={1,2,3,4,5} for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2784

Multiple choice Unit 4: Data Collections
What are the final array contents?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2785

Multiple choice Unit 4: Data Collections
What is count after the loop? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2786

Multiple choice Unit 4: Data Collections
What are the final array and sum? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2787

Multiple choice Unit 4: Data Collections
For a nonempty array, what does this method return? public int mystery(int[] a){ int m=-1,index=0; for(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2788

Multiple choice Unit 4: Data Collections
Consider the following 2D array: int[][] matrix = new int[3][4]; int count = 0; for (int i = 0;i < matrix.length;i++) { for (int j =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2789

Multiple choice Unit 4: Data Collections
What is printed? int[] arr={1,2,3,4,5};int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2790

Multiple choice Unit 4: Data Collections
What is printed? int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,781 of 3,140
Page 279 of 314