Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions unit by unit, 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 261–270 of 2,811
  1. 261
  2. 262
  3. 263
  4. 264
  5. 265
  6. 266
  7. 267
  8. 268
  9. 269
  10. 270

Question 261

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment. String a = "A"; String b = a;// Line 1 String c = a + 1;// Line 2 String d = b +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 262

Multiple choice Unit 1: Using Objects and Methods
Consider the following method. public int randomPoints(int n) { return (int) (n * Math.random()) + 1; } Which of the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 263

Multiple choice Unit 1: Using Objects and Methods
Given the declarations: int p = 5; int q = 3; Which of the following expressions evaluate…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 264

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: String band = "anamanaguchi";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 265

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: if (!somethingIsFalse()) return false; else…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 266

Multiple choice Unit 1: Using Objects and Methods
Consider the following statement: System.out.println(Math.pow(2,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 267

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: Integer n = 3; // Line 1 Double x = 0.14; // Line 2…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 268

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: String abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; < missing statement > System.out.println(abc.substring(k, k+1)); It is intended…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 269

Multiple choice Unit 1: Using Objects and Methods
Consider the following Java statements: double x = 2.5, y = 1.99;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 270

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: String abc = "AAABBBCCC"; String abc1 = abc.substring(0, abc.length() - 1); abc1 =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 261 of 2,811
Page 27 of 282