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 1,821–1,830 of 2,811
  1. 1821
  2. 1822
  3. 1823
  4. 1824
  5. 1825
  6. 1826
  7. 1827
  8. 1828
  9. 1829
  10. 1830

Question 1821

Multiple choice Unit 4: Data Collections
Consider the following recursive method. public static void whatsItDo(String str) { int len = str.length(); if (len > 1) { String temp…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1822

Multiple choice Unit 4: Data Collections
What is the output of the following program? public class SayHello { public void run() { String stringArray[] =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1823

Multiple choice Unit 4: Data Collections
What value will be held in mysteryNumber when this code finishes running? int mysteryNumber = 0; String[] mysteryArray =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1824

Multiple choice Unit 4: Data Collections
What will the Array gameBoard contain after this code runs? int WIDTH = 3; int HEIGHT = 3; String[] gameBoard = new String[WIDTH * HEIGHT]; for(int m = 0; m <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1825

Multiple choice Unit 4: Data Collections
Given the following values of arr and the mystery method, what will the values of arr be after you execute: mystery()? private…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1826

Multiple choice Unit 4: Data Collections
The following codes are intended to add 5 to each item in the array. I. int[] numbers = {1, 2, 3, 4}; for (int i = 0;i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1827

Multiple choice Unit 4: Data Collections
What does the following code do when executed? int[] highTemp = {88, 92, 94, 90, 88, 83}; int target = 90;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1828

Multiple choice Unit 4: Data Collections
The method should detect equal adjacent elements. Which changes are needed? I: initialize…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1829

Multiple choice Unit 4: Data Collections
What will print out when the following code executes? int[] nums = {1, 2, 3, 4, 5, 6}; int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1830

Multiple choice Unit 4: Data Collections
What does the following code snippet output? int[] numbers = {1, 2, 3, 4, 5}; int[] temp = new int[numbers.length]; for (int i = 0;i < numbers.length - 1;i++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,821 of 2,811
Page 183 of 282