Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Data Collections, 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 921–930 of 1,079
  1. 921
  2. 922
  3. 923
  4. 924
  5. 925
  6. 926
  7. 927
  8. 928
  9. 929
  10. 930

Question 921

Multiple choice Using Text Files
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 922

Multiple choice Using Text Files
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 923

Multiple choice Using Text Files
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 924

Multiple choice Using Text Files
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 925

Multiple choice Using Text Files
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 926

Multiple choice Using Text Files
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 927

Multiple choice Using Text Files
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 928

Multiple choice Using Text Files
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 929

Multiple choice Using Text Files
A text file contains: 6 3 8 1 5. What is printed? int min = sc.nextInt(); while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 930

Multiple choice Using Text Files
A text file contains two lines: 10 20 30 40 What is printed? int sum = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 921 of 1,079
Page 93 of 108