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,361–2,370 of 3,140
  1. 2361
  2. 2362
  3. 2363
  4. 2364
  5. 2365
  6. 2366
  7. 2367
  8. 2368
  9. 2369
  10. 2370

Question 2361

Free response Unit 4: Data Collections
Coin Collector The High School Coin Collection Club needs new software to help organize its coin collections. Each coin in the collection is represented by an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2362

Multiple choice Unit 4: Data Collections
Consider the following code segment. int[] myArray = {2, 3, 4, 1, 7, 6, 8}; int index = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2363

Multiple choice Unit 4: Data Collections
Consider the following class used by a company to represent the items it has available for online purchase. public class OnlinePurchaseItem { public double…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2364

Multiple choice Unit 4: Data Collections
Consider the following method. public int mystery(int n) { if (n <= 1) return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2365

Multiple choice Unit 4: Data Collections
Consider the following method. public int guess(int num1, int num2) { if (num1 % num2 == 0) return (num2 + num1) / 2; return…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2366

Multiple choice Unit 4: Data Collections
Consider the following code segment. String crazyString = "crazy"; ArrayList<String> crazyList = new ArrayList<String>(); crazyList.add("weird");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2367

Multiple choice Unit 4: Data Collections
Assume int[] arr has been correctly instantiated and is of sufficient size. Which of these code segments results in identical arrays? I. int i = 1; while (i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2368

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2369

Multiple choice Unit 4: Data Collections
Consider the following method. public int doStuff(int[] numberArray) { int index = 0; int maxCounter = 1; int counter = 1; for (int k = 1; k <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2370

Multiple choice Unit 4: Data Collections
Consider the following method. public int changeEm(int num1, int num2, int[] values) { num1 = values[num2]; values[num1] = num2; num2++; return num2; } Consider…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,361 of 3,140
Page 237 of 314