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 231–240 of 454
  1. 231
  2. 232
  3. 233
  4. 234
  5. 235
  6. 236
  7. 237
  8. 238
  9. 239
  10. 240

Question 231

Multiple choice Using Objects
Which of the following code segments correctly creates an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 232

Multiple choice Using Objects
Consider the following code segment. int x = ((int) (Math.random() * 10)) + 5; int y = ((int) (Math.random() * 5)) +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 233

Multiple choice Using Objects
Consider the following code segment. String str1 = "LMNOP"; String str2 =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 234

Multiple choice Using Objects
Consider the following method. public static int mystery(int n){ int a, b, c = 0; while (n > 0){ a = n/10; b = n…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 235

Multiple choice Using Objects
Consider the following method. // precondition : n > 1 public static double solve(int n) { double answer = 1.0; for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 236

Multiple choice Using Objects
Consider the following method, which is intended to count the number of times a value is doubled before it is at least as large as a target value. //…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 237

Multiple choice Using Objects
Which expression below is equivalent to the following?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 238

Multiple choice Using Objects
What is the output of the following code? String word = "blueprint"; String…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 239

Multiple choice Using Objects
Consider: String[] parts =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 240

Multiple choice Using Objects
Consider the following code segment: String s = "examination"; int result =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 231 of 454
Page 24 of 46