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 461–470 of 546
  1. 461
  2. 462
  3. 463
  4. 464
  5. 465
  6. 466
  7. 467
  8. 468
  9. 469
  10. 470

Question 461

Multiple choice Using Objects
The String s contains four characters. The ints a and b may be negative or positive. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 462

Multiple choice Using Objects
What is printed? String word = "notebook";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 463

Multiple choice Using Objects
Which offered value of start makes the code print true without throwing an exception? String word =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 464

Multiple choice Using Objects
What is printed? String s = "desk"; System.out.print("[" +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 465

Multiple choice Using Objects
What happens when the code executes? String s = "ABCD";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 466

Multiple choice Using Objects
A nonempty marker occurs in text, and p is the starting index of its first occurrence. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 467

Multiple choice Using Objects
What is printed? String route = "long:red:blue"; int split = route.indexOf(":");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 468

Multiple choice Using Objects
A nonempty String s has length n. A label must show its middle character when n is odd and its…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 469

Multiple choice Using Objects
What is printed? String a = "sunset"; String b = a; a =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 470

Multiple choice Using Objects
What is printed? String a = "A" + 1 + 2; String b = 1 + 2 + "A";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 461 of 546
Page 47 of 55