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 721–730 of 3,140
  1. 721
  2. 722
  3. 723
  4. 724
  5. 725
  6. 726
  7. 727
  8. 728
  9. 729
  10. 730

Question 721

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "baaaabb"; for (int i = 0; i < s.length() - 1; i++) { if (s.substring(i, i +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 722

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 723

Multiple choice Unit 1: Using Objects and Methods
The expressions below are both true. Which additional expression…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 724

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 725

Multiple choice Unit 1: Using Objects and Methods
The int k may be 0, 1, 2, or 3. Which list gives all values of k for which result…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 726

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 727

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 728

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 729

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 730

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 721 of 3,140
Page 73 of 314