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 631–640 of 2,811
  1. 631
  2. 632
  3. 633
  4. 634
  5. 635
  6. 636
  7. 637
  8. 638
  9. 639
  10. 640

Question 631

Multiple choice Unit 1: Using Objects and Methods
Which offered value of s makes same true? int middle = s.length() / 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 632

Multiple choice Unit 1: Using Objects and Methods
All indices make the expression below valid. Which expression always returns the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 633

Multiple choice Unit 1: Using Objects and Methods
What is printed? No spaces are printed between the numbers. String s = "ababa"; for (int k = 1; k <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 634

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "ababa"; String tail = s.substring(2);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 635

Multiple choice Unit 1: Using Objects and Methods
The condition is intended to detect whether text ends with suffix. Which pair makes it return true…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 636

Multiple choice Unit 1: Using Objects and Methods
The condition below is true. What must also be…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 637

Multiple choice Unit 1: Using Objects and Methods
A student claims found is true whenever text contains both "cat" and "cater". Which offered input…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 638

Multiple choice Unit 1: Using Objects and Methods
The int start is a valid substring boundary, and key is nonempty. Which replacement makes p the original index of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 639

Multiple choice Unit 1: Using Objects and Methods
key has exactly one character. Which condition is true…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 640

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "abca"; s += s.substring(0, 1);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 631 of 2,811
Page 64 of 282