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.

Subtopic: Using Objects Clear filter

Questions 501–510 of 546
  1. 501
  2. 502
  3. 503
  4. 504
  5. 505
  6. 506
  7. 507
  8. 508
  9. 509
  10. 510

Question 501

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 502

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 503

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 504

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 505

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 506

Multiple choice Using Objects
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 507

Multiple choice Using Objects
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 508

Multiple choice Using Objects
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 509

Multiple choice Using Objects
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 510

Multiple choice Using Objects
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 501 of 546
Page 51 of 55