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 651–660 of 2,811
  1. 651
  2. 652
  3. 653
  4. 654
  5. 655
  6. 656
  7. 657
  8. 658
  9. 659
  10. 660

Question 651

Multiple choice Unit 1: Using Objects and Methods
What is printed? String value = null;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 652

Multiple choice Unit 1: Using Objects and Methods
What is printed? String a = "go"; String b = a; a = null;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 653

Multiple choice Unit 1: Using Objects and Methods
What happens when the code executes? String s = null; if (s == null || s.length()…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 654

Multiple choice Unit 1: Using Objects and Methods
s may be null or empty. Which condition safely accepts…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 655

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "ABCDE"; int count = 0; for (int i = 0; i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 656

Multiple choice Unit 1: Using Objects and Methods
Which offered initial value of s makes this loop continue forever? while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 657

Multiple choice Unit 1: Using Objects and Methods
What is printed? String text = "abaca"; String out = ""; for (int i = 0; i < text.length(); i++) { String ch =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 658

Multiple choice Unit 1: Using Objects and Methods
What does count represent after the loop for every String text? int count = 0; for (int i = 0; i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 659

Multiple choice Unit 1: Using Objects and Methods
s may be empty. Which expression is guaranteed to be true after the loop? String out =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 660

Multiple choice Unit 1: Using Objects and Methods
s is initially nonempty. Which list gives all initial lengths of s for which cuts…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 651 of 2,811
Page 66 of 282