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.

Questions 291–300 of 776
  1. 291
  2. 292
  3. 293
  4. 294
  5. 295
  6. 296
  7. 297
  8. 298
  9. 299
  10. 300

Question 291

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 292

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 293

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 294

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 295

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 296

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 297

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 298

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 299

Multiple choice Using Objects
Consider the following code segment. int val1 = 10; int val2 = 7; val1 = (val1 + val2) % (val1 - val2); val2 = 3 + val1 * val2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 300

Multiple choice Using Objects
Assume double dnum has been correctly declared and initialized with a valid value.…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 291 of 776
Page 30 of 78