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,651–2,660 of 2,811
  1. 2651
  2. 2652
  3. 2653
  4. 2654
  5. 2655
  6. 2656
  7. 2657
  8. 2658
  9. 2659
  10. 2660

Question 2651

Multiple choice Unit 4: Data Collections
A text file contains: 3 cats. What is printed? int n =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2652

Multiple choice Unit 4: Data Collections
A text file contains: 4 5. What is printed? String a = sc.next(); String b = sc.next();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2653

Multiple choice Unit 4: Data Collections
A text file contains: false 10. What is printed? boolean b = sc.nextBoolean(); int x =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2654

Multiple choice Unit 4: Data Collections
A text file contains: 10 20 30. What is printed? int sum = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2655

Multiple choice Unit 4: Data Collections
A text file contains: cat dog bird fish. What is printed? int count = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2656

Multiple choice Unit 4: Data Collections
A text file contains: 2 3 5. What is printed? int product = 1; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2657

Multiple choice Unit 4: Data Collections
A text file contains: 5 10 15 20. What is printed? int last = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2658

Multiple choice Unit 4: Data Collections
A text file contains: 3 8 5 12 7 4. What is printed? int count = 0; while (sc.hasNext()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2659

Multiple choice Unit 4: Data Collections
A text file contains: 3 7 2 9 5. What is printed? int sum = 0; while (sc.hasNext()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2660

Multiple choice Unit 4: Data Collections
A text file contains: 4 9 2 7 1. What is printed? int max = sc.nextInt(); while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,651 of 2,811
Page 266 of 282