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,351–2,360 of 3,140
  1. 2351
  2. 2352
  3. 2353
  4. 2354
  5. 2355
  6. 2356
  7. 2357
  8. 2358
  9. 2359
  10. 2360

Question 2351

Free response Unit 4: Data Collections
A student plans to analyze product reviews found on a Web site by looking for keywords in posted reviews. The ProductReview class, shown below, is used to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2352

Free response Unit 4: Data Collections
A theater contains rows of seats with the same number of seats in each row. Some rows contain tier 1 seats, and the remaining rows contain tier 2 seats. Tier 1…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2353

Multiple choice Unit 4: Data Collections
Assume list is an ArrayList<Integer> that has been correctly constructed and populated with the following items. [13, 7, 0, 5, 12, 6, 10] Consider the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2354

Multiple choice Unit 4: Data Collections
Consider the following code segment. ArrayList<String> supernatural = new ArrayList<String>(); supernatural.add("Vampire"); supernatural.add("Werewolf");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2355

Multiple choice Unit 4: Data Collections
Suppose that grid has been initialized as n-by-n 2-D array of integers.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2356

Multiple choice Unit 4: Data Collections
Consider the following method. public int loopy(int n) { if (n % 7 == 0) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2357

Multiple choice Unit 4: Data Collections
Consider the following code segment. int [] array = {-3, 0, 2, 4, 5, 9, 13, 1, 5}; for (int n = 1; n < array.length - 1; n++) { if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2358

Multiple choice Unit 4: Data Collections
Consider the following code segment. int [] ray = new int [11]; for (int i = 0; i < ray.length; i++) { ray[i] = i * 2; } for (int m = 0; m < 5;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2359

Multiple choice Unit 4: Data Collections
Consider the following method. public void mystery (int[] array) { for (int i = 1; i < array.length; i++) { int j; int key = array[i]; for (j = i - 1; j >= 0 &&…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2360

Multiple choice Unit 4: Data Collections
Consider the following class declaration. public class City { private String name; private int population; public City(String myName, int myPop) { name =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,351 of 3,140
Page 236 of 314