Verityprep
Question Bank · Unit 4

AP® Computer Science A Data Collections Practice Questions

Work through AP Computer Science A practice 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 801–810 of 1,222
  1. 801
  2. 802
  3. 803
  4. 804
  5. 805
  6. 806
  7. 807
  8. 808
  9. 809
  10. 810

Question 801

Multiple choice Using Text Files
File content: 5 10 15 What does this print? int sum = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 802

Multiple choice Using Text Files
File content: A B C D What happens? while (scan.hasNextLine()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 803

Multiple choice Using Text Files
Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 804

Multiple choice Using Text Files
File content: John Doe What does this code…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 805

Multiple choice Using Text Files
Each line is Name-Email-Age, with no hyphens inside fields. For the input shown, which prints only…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 806

Multiple choice Using Text Files
With Locale.US and positive averages, which prints the name with the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 807

Multiple choice Using Text Files
With Locale.US and at least one Product-Price line, which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 808

Multiple choice Using Text Files
Given "City - Population" per line, print the total…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 809

Multiple choice Using Text Files
Each line contains a word. Which prints…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 810

Multiple choice Using Text Files
For a nonempty file of valid doubles using…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 801 of 1,222
Page 81 of 123