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 691–700 of 3,140
  1. 691
  2. 692
  3. 693
  4. 694
  5. 695
  6. 696
  7. 697
  8. 698
  9. 699
  10. 700

Question 691

Multiple choice Unit 1: Using Objects and Methods
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 692

Multiple choice Unit 1: Using Objects and Methods
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 693

Multiple choice Unit 1: Using Objects and Methods
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 694

Multiple choice Unit 1: Using Objects and Methods
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 695

Multiple choice Unit 1: Using Objects and Methods
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 696

Multiple choice Unit 1: Using Objects and Methods
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 697

Multiple choice Unit 1: Using Objects and Methods
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 698

Multiple choice Unit 1: Using Objects and Methods
Which replacement for the blank makes the code print 6:m? String word = "plum"; int total = 0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 699

Multiple choice Unit 1: Using Objects and Methods
The Strings text and suffix are non-null, and suffix is nonempty. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 700

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "ab"; String original = s; s +=…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 691 of 3,140
Page 70 of 314