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.

Questions 661–670 of 681
  1. 661
  2. 662
  3. 663
  4. 664
  5. 665
  6. 666
  7. 667
  8. 668
  9. 669
  10. 670

Question 661

Multiple choice Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
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 Using Objects
s is nonempty. Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 667

Multiple choice Using Objects
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 Using Objects
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 Primitive Types
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 Primitive Types
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 681
Page 67 of 69