Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 371–380 of 454
  1. 371
  2. 372
  3. 373
  4. 374
  5. 375
  6. 376
  7. 377
  8. 378
  9. 379
  10. 380

Question 371

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 372

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 373

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 374

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 375

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 376

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 377

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 378

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 379

Multiple choice Using Objects
What is printed? The variable ending is not final. String ending = "ar"; String built = "st" + ending; String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 380

Multiple choice Using Objects
What is printed? String state = "reset"; if (state.equals("reset")) { state =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 371 of 454
Page 38 of 46