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 781–790 of 1,222
  1. 781
  2. 782
  3. 783
  4. 784
  5. 785
  6. 786
  7. 787
  8. 788
  9. 789
  10. 790

Question 781

Multiple choice Using Text Files
Which string delimiter fills the blank so the code prints Row0:red, Row1:green and Row2:blue on separate lines? String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 782

Multiple choice Using Text Files
What is printed? String s="id=42;user=alice;role=admin"; String[] kv=s.split(";"); String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 783

Multiple choice Using Text Files
What is printed? String s="2025/09/07"; String[] d=s.split("/");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 784

Multiple choice Using Text Files
Which prints the initials…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 785

Multiple choice Using Text Files
What is printed? String s="sec1:topicA,topicB,topicC"; String[] leftRight=s.split(":"); String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 786

Multiple choice Using Text Files
Which prints d-c-b-a from…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 787

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 788

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 789

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 790

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 781 of 1,222
Page 79 of 123