Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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,681–2,690 of 2,811
  1. 2681
  2. 2682
  3. 2683
  4. 2684
  5. 2685
  6. 2686
  7. 2687
  8. 2688
  9. 2689
  10. 2690

Question 2681

Multiple choice Unit 4: Data Collections
A text file contains: 5,10,15. What is printed? String line = sc.nextLine(); sc.close(); String[] parts =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2682

Multiple choice Unit 4: Data Collections
A text file contains: hello world from java. What is printed? String line = sc.nextLine();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2683

Multiple choice Unit 4: Data Collections
A text file contains two lines: Name,Score Alice,95 The first line is a header. What is printed? sc.nextLine(); // skip header…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2684

Multiple choice Unit 4: Data Collections
A text file contains: 2.5-3.5-4.0. What is printed? String line = sc.nextLine(); sc.close(); String[] parts =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2685

Multiple choice Unit 4: Data Collections
A text file contains: 10,20,30,40,50. What is printed? String line = sc.nextLine();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2686

Multiple choice Unit 4: Data Collections
A text file contains two lines: 1,2,3 4,5,6 What is printed? int sum = 0; while (sc.hasNext()) { String line =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2687

Multiple choice Unit 4: Data Collections
A text file contains: The quick brown fox jumps. What is printed? String line =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2688

Multiple choice Unit 4: Data Collections
A text file contains: Java:is:fun. What is printed? String line = sc.nextLine(); sc.close();…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2689

Multiple choice Unit 4: Data Collections
A text file contains three lines: 10,20 30,40 50,60 What is printed? int sum = 0; while (sc.hasNext()) { String line = sc.nextLine(); String[]…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2690

Multiple choice Unit 4: Data Collections
A text file contains: cat,dog,cat,bird,cat. What is printed? String line = sc.nextLine(); sc.close(); String[] parts =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,681 of 2,811
Page 269 of 282