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,771–2,780 of 3,140
  1. 2771
  2. 2772
  3. 2773
  4. 2774
  5. 2775
  6. 2776
  7. 2777
  8. 2778
  9. 2779
  10. 2780

Question 2771

Multiple choice Unit 4: Data Collections
Consider the following code segment: int[][] numbers = new int [4][4]; initializeIt(numbers); int total = 0; for (int z = 0; z < numbers.length; z++) { total +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2772

Multiple choice Unit 4: Data Collections
Consider the following code segment: int[][] numbers = new int[3][6]; initializeIt(numbers); int total = 0; for (int j = 0; j < numbers.length; j++) { for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2773

Multiple choice Unit 4: Data Collections
Consider the following code segment: int[][] num = new int[4][4]; for (int i = 0; i < num.length; i++) { for (int k =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2774

Multiple choice Unit 4: Data Collections
Consider the following code segment: int [][] numbers = {{1, 2, 3, 4},{5, 6, 7, 8}}; initializeIt(numbers); String line = ""; for (int a = 0; a <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2775

Multiple choice Unit 4: Data Collections
Consider the following client code and method: int [][] numbers = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}; int [] myArr = mystery(numbers, 2); for (int j:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2776

Multiple choice Unit 4: Data Collections
Consider the following code: int [][] numbers = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}; for (int r = numbers.length - 1; r > 0 ; r--) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2777

Multiple choice Unit 4: Data Collections
What does mystery(3543) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2778

Multiple choice Unit 4: Data Collections
What does mystery(6) return? public int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2779

Multiple choice Unit 4: Data Collections
What does mystery(10) return? public int mystery(int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2780

Multiple choice Unit 4: Data Collections
Which recursive definitions match a loop that sums integers x through 1, for every x >= 0? Assume no integer overflow. // I:…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,771 of 3,140
Page 278 of 314