Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice 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 661–670 of 2,811
  1. 661
  2. 662
  3. 663
  4. 664
  5. 665
  6. 666
  7. 667
  8. 668
  9. 669
  10. 670

Question 661

Multiple choice Unit 1: Using Objects and Methods
What is printed? String s = "ababa"; int total = 0; for (int i = 0; i <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 662

Multiple choice Unit 1: Using Objects and Methods
n is s.length(), and 0 <= k <= n. Which expression reconstructs the original s from rotated for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 663

Multiple choice Unit 1: Using Objects and Methods
Which offered value of s makes a and b different? String a =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 664

Multiple choice Unit 1: Using Objects and Methods
What is printed? Java evaluates method arguments from left to right. String s =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 665

Multiple choice Unit 1: Using Objects and Methods
s is nonempty. Which statement describes result after the code executes for every…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 666

Multiple choice Unit 1: Using Objects and Methods
s is nonempty. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 667

Multiple choice Unit 1: Using Objects and Methods
x and y are nonempty and have equal lengths. The condition below is true. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 668

Multiple choice Unit 1: Using Objects and Methods
a and b may be empty. Which condition is necessary and sufficient for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 669

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? int total = 7; int n = 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 670

Multiple choice Unit 1: Using Objects and Methods
What is printed as a result of executing the following code segment? int a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 661 of 2,811
Page 67 of 282