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 441–450 of 681
  1. 441
  2. 442
  3. 443
  4. 444
  5. 445
  6. 446
  7. 447
  8. 448
  9. 449
  10. 450

Question 441

Multiple choice Primitive Types
Consider the following code segment. int a = 17; int b = 5; double r = a / b + 1.0 *…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 442

Multiple choice Using Objects
Consider the following code segment. String s = "abracadabra"; int p = s.indexOf("ab", 1); int c = s.indexOf("c");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 443

Multiple choice Primitive Types
Consider the following code segment. int n = 25; int m = 4; double r = (n + 1) / m * 1.0…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 444

Multiple choice Primitive Types
Consider the following code segment. int x = 4; int y = x++; y += ++x; x *= y -…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 445

Multiple choice Using Objects
Consider the following code segment. String a = "hello"; String b = "he" + "llo"; String c = "he"; String d = c +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 446

Multiple choice Using Objects
Consider the following code segment. String s = "Computer Science A"; int p = s.indexOf(" "); int q = s.indexOf(" ", p + 1); String first = s.substring(0, p);…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 447

Multiple choice Primitive Types
Consider the following code segment. int a = 18; int b = 5; double x = a…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 448

Multiple choice Using Objects
Consider the following declarations.
String s1 = "AP";
String s2 = s1 + "CSA";
String s3 = "APCSA";
Which of the following statements must be true?
Pick an answer, then check it. The solution opens in a window.

Question 449

Multiple choice Using Objects
Consider the following code segment. String code = "practice"; String part =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 450

Multiple choice Primitive Types
Consider the following code segment. Integer n = new Integer(7); Double d = new…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 441 of 681
Page 45 of 69