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 751–760 of 3,140
  1. 751
  2. 752
  3. 753
  4. 754
  5. 755
  6. 756
  7. 757
  8. 758
  9. 759
  10. 760

Question 751

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 752

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 753

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 754

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 755

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 756

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 757

Multiple choice Unit 1: Using Objects and Methods
n is s.length(), and 0 <= k <= n. Which expression reconstructs the original s from rotated for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 758

Multiple choice Unit 1: Using Objects and Methods
Which offered value of s makes a and b different? String a =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 759

Multiple choice Unit 1: Using Objects and Methods
What is printed? Java evaluates method arguments from left to right. String s =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 760

Multiple choice Unit 1: Using Objects and Methods
s is nonempty. Which statement describes result after the code executes for every…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 751 of 3,140
Page 76 of 314