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 721–730 of 1,079
  1. 721
  2. 722
  3. 723
  4. 724
  5. 725
  6. 726
  7. 727
  8. 728
  9. 729
  10. 730

Question 721

Multiple choice Using Text Files
Given a file names.txt with the following content: Cohen-Isabel Lee-Cindy Patel-Anisha Which code correctly…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 722

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 723

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 724

Multiple choice Using Text Files
Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 725

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 726

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 727

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 728

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 729

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 730

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 721 of 1,079
Page 73 of 108