Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice questions on Using Objects and Methods, 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 776
  1. 751
  2. 752
  3. 753
  4. 754
  5. 755
  6. 756
  7. 757
  8. 758
  9. 759
  10. 760

Question 751

Multiple choice Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 776
Page 76 of 78