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 411–420 of 546
  1. 411
  2. 412
  3. 413
  4. 414
  5. 415
  6. 416
  7. 417
  8. 418
  9. 419
  10. 420

Question 411

Multiple choice Using Objects
Consider the following declaration: String s = "hello";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 412

Multiple choice Using Objects
What is printed by the following code segment? String s1 = "pear"; String s2 = "peach"; if (s1.compareTo(s2) <…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 413

Multiple choice Using Objects
What is printed? int drift = -7; double offset = -2.5;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 414

Multiple choice Using Objects
What is printed? int position = -9;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 415

Multiple choice Using Objects
What is printed? int left = -6; int right = 2; int a = Math.abs(left -…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 416

Multiple choice Using Objects
The doubles measured and target are between -10.0 and 10.0. Which expression is true…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 417

Multiple choice Using Objects
What is printed? double x = -7.5; int first = (int) Math.abs(x) / 2;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 418

Multiple choice Using Objects
What is printed? int a = -9; int b = 4;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 419

Multiple choice Using Objects
A sensor should be accepted when it is within 2 units of 4 but more than 4 units from -1. Which offered int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 420

Multiple choice Using Objects
What is printed? double a = Math.pow(-3, 2);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 411 of 546
Page 42 of 55