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

Question 721

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