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,761–1,770 of 2,811
  1. 1761
  2. 1762
  3. 1763
  4. 1764
  5. 1765
  6. 1766
  7. 1767
  8. 1768
  9. 1769
  10. 1770

Question 1761

Multiple choice Unit 4: Data Collections
Consider the problem of finding the maximum value in an array of integers. The following code segments are proposed solutions to the problem. Assume that the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1762

Multiple choice Unit 4: Data Collections
Consider the following instance variable and method. Method wordsWithCommas is intended to return a string containing all the words in listOfWords separated by…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1763

Multiple choice Unit 4: Data Collections
Questions refer to the following information. Consider the following binarySearch method. The method correctly performs a binary search. /** Precondition: data…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1764

Multiple choice Unit 4: Data Collections
Suppose the binarySearch method is called with an array containing 2,000 elements sorted in increasing…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1765

Multiple choice Unit 4: Data Collections
Consider the following incomplete method that is intended to return a string formed by concatenating elements from the parameter words. The elements to be…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1766

Multiple choice Unit 4: Data Collections
Consider the following method. /** Precondition: 0 < numVals <= nums.length */ public static int mystery(int[] nums, int v, int numVals) { int k = 0; if (v ==…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1767

Multiple choice Unit 4: Data Collections
Consider the following code segment. List<String> students = new ArrayList<String>(); students.add("Alex"); students.add("Bob"); students.add("Carl"); for (int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1768

Multiple choice Unit 4: Data Collections
Assume that an array of integer values has been declared as follows and has been initialized. int[] arr =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1769

Multiple choice Unit 4: Data Collections
Consider the following code segment. ArrayList<String> items = new ArrayList<String>(); items.add("A"); items.add("B"); items.add("C");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1770

Multiple choice Unit 4: Data Collections
Consider the following instance variable and incomplete method. The method calcTotal is intended to return the sum of all values in vals. private int[] vals;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,761 of 2,811
Page 177 of 282