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 281–290 of 2,811
  1. 281
  2. 282
  3. 283
  4. 284
  5. 285
  6. 286
  7. 287
  8. 288
  9. 289
  10. 290

Question 281

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: String str = "mnopqr"; for (int x = 0; x < str.length() - 1; x++) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 282

Multiple choice Unit 1: Using Objects and Methods
Consider the following code segment: int x = 2; int y = -1; while (x < 30) { x =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 283

Multiple choice Unit 1: Using Objects and Methods
Consider the following class declaration: public class Test { private int value; public Test(int n) { value = n; } public void add(int amount) { value = value +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 284

Multiple choice Unit 1: Using Objects and Methods
What is printed when the following statement is…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 285

Multiple choice Unit 1: Using Objects and Methods
What is printed when the following code segment is executed? String url = "http://www.usa.gov"; int pos =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 286

Multiple choice Unit 1: Using Objects and Methods
Given file line "Alice-90", how…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 287

Multiple choice Unit 1: Using Objects and Methods
Evaluate the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 288

Multiple choice Unit 1: Using Objects and Methods
Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 289

Multiple choice Unit 1: Using Objects and Methods
Consider the following code snippet: public class Main { public static void main(String[] args) { int a = 5;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 290

Multiple choice Unit 1: Using Objects and Methods
Consider the following code snippet. public static void main(String args[]){ final…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 281 of 2,811
Page 29 of 282