Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice questions unit by unit, 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 2,711–2,720 of 3,140
  1. 2711
  2. 2712
  3. 2713
  4. 2714
  5. 2715
  6. 2716
  7. 2717
  8. 2718
  9. 2719
  10. 2720

Question 2711

Multiple choice Unit 4: Data Collections
What happens if you…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2712

Multiple choice Unit 4: Data Collections
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 2713

Multiple choice Unit 4: Data Collections
Which is NOT a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2714

Multiple choice Unit 4: Data Collections
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 2715

Multiple choice Unit 4: Data Collections
What does this code output for file: A-B C-D while (scan.hasNext()) { String[] parts =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2716

Multiple choice Unit 4: Data Collections
Why can nextLine() return an empty string immediately…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2717

Multiple choice Unit 4: Data Collections
File content: true false hello What happens with: while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2718

Multiple choice Unit 4: Data Collections
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 2719

Multiple choice Unit 4: Data Collections
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 2720

Multiple choice Unit 4: Data Collections
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 2,711 of 3,140
Page 272 of 314