Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice 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 221–230 of 546
  1. 221
  2. 222
  3. 223
  4. 224
  5. 225
  6. 226
  7. 227
  8. 228
  9. 229
  10. 230

Question 221

Multiple choice Using Objects
What is printed as a result of executing the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 222

Multiple choice Using Objects
Consider the following code segment. String str1 = "presto chango"; String str2 = "abracadabra"; int i =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 223

Multiple choice Using Objects
Which of the following returns the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 224

Multiple choice Using Objects
Which statement assigns a random integer…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 225

Multiple choice Using Objects
After executing the code segment, what are the possible…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 226

Multiple choice Using Objects
Which of the following statements generates a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 227

Multiple choice Using Objects
Consider the following code segment. int r = 100; int answer = (int)(Math.PI * Math.pow(r,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 228

Multiple choice Using Objects
Consider the following code segment. String ex1 = "example"; String ex2 = "elpmaxe"; ex1 = ex1.substring(1, ex1.indexOf("p")); ex2 = ex2 + ex2.substring(3,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 229

Multiple choice Using Objects
Which print statement will produce the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 230

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

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 221 of 546
Page 23 of 55