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.

Subtopic: Using Text Files Clear filter

Questions 91–100 of 181
  1. 91
  2. 92
  3. 93
  4. 94
  5. 95
  6. 96
  7. 97
  8. 98
  9. 99
  10. 100

Question 91

Multiple choice Using Text Files
A text file contains: 10 3. What is printed? int x = sc.nextInt();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 92

Multiple choice Using Text Files
A text file contains: AP CSA 2026. What is printed? String s…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 93

Multiple choice Using Text Files
A text file contains: hello. What is printed? Note that close() is called…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 94

Multiple choice Using Text Files
A text file contains: 1.5 2.5. What is printed? double a =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 95

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

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

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 98

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 99

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 100

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 91 of 181
Page 10 of 19