Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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,501–2,510 of 2,811
  1. 2501
  2. 2502
  3. 2503
  4. 2504
  5. 2505
  6. 2506
  7. 2507
  8. 2508
  9. 2509
  10. 2510

Question 2501

Multiple choice Unit 4: Data Collections
What is printed? java.util.ArrayList myList=new…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2502

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2503

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 2504

Multiple choice Unit 4: Data Collections
The following class, Arr2d, is meant to represent a two-dimensional array object. The constructor will initialize Arr2d using the number of rows and columns…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2505

Multiple choice Unit 4: Data Collections
Which output layout results? int[][] numbers={{1,2,3,4},{5,6,7,8}}; for(int[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2506

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 2507

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 2508

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 2509

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 2510

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 2,501 of 2,811
Page 251 of 282