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 21–30 of 181
  1. 21
  2. 22
  3. 23
  4. 24
  5. 25
  6. 26
  7. 27
  8. 28
  9. 29
  10. 30

Question 21

Multiple choice Using Text Files
The Scanner reads a file with exactly three lines:10,20,30. Which listed loops print those same three lines? A parses int tokens; B reads full lines; C reads…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 22

Multiple choice Using Text Files
Which statement about…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 23

Multiple choice Using Text Files
If you call nextInt() but the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 24

Multiple choice Using Text Files
File contains: true false true What will the loop below print? while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 25

Multiple choice Using Text Files
Which of these…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 26

Multiple choice Using Text Files
Which Scanner method is best to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 27

Multiple choice Using Text Files
What happens if you…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 28

Multiple choice Using Text Files
What does this code print for input file: Hello World…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 29

Multiple choice Using Text Files
Which is NOT a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 30

Multiple choice Using Text Files
With Locale.US, input tokens are3.5,notANumber,7.2. What does the loop…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 21 of 181
Page 3 of 19