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,231–2,240 of 2,811
  1. 2231
  2. 2232
  3. 2233
  4. 2234
  5. 2235
  6. 2236
  7. 2237
  8. 2238
  9. 2239
  10. 2240

Question 2231

Multiple choice Unit 4: Data Collections
A sorted list of 120 integers is to be searched to determine whether the value 100 is in the list. Assuming…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2232

Multiple choice Unit 4: Data Collections
Consider a sorted array arr of n elements, where n is large and n is even. Under which conditions will a sequential search of arr be faster…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2233

Multiple choice Unit 4: Data Collections
Refer to the following data field and method. private int[] arr; /** Precondition: arr.length > 0 and index < arr.length. */ public void remove(int index) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2234

Multiple choice Unit 4: Data Collections
A matrix class that manipulates matrices contains the following declaration. private int[][] mat = new int[numRows][numCols]; Consider the following method that…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2235

Multiple choice Unit 4: Data Collections
Consider an array arr that is sorted in increasing order, and method findMost given below. Method findMost is intended to find the value in the array that…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2236

Multiple choice Unit 4: Data Collections
Consider an array arr that is sorted in increasing order, and method findMost given below. Method findMost is intended to find the value in the array that…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2237

Multiple choice Unit 4: Data Collections
public class Card { private String suit; private int value; //0 to 12 public Card(String cardSuit, int cardValue) {/* implementation */ } public String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2238

Multiple choice Unit 4: Data Collections
Refer to the following method that finds the smallest value in an array. /** Precondition: arr is an array of nonzero length * and is initialized with int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2239

Multiple choice Unit 4: Data Collections
When will method whatIsIt cause a stack overflow (i.e., cause computer memory to be exhausted)?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2240

Multiple choice Unit 4: Data Collections
The boolean expression a[i] == max…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,231 of 2,811
Page 224 of 282