Verityprep
Question Bank

AP® Computer Science A Practice Questions

Work through AP Computer Science A practice 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 1,061–1,070 of 3,140
  1. 1061
  2. 1062
  3. 1063
  4. 1064
  5. 1065
  6. 1066
  7. 1067
  8. 1068
  9. 1069
  10. 1070

Question 1061

Multiple choice Unit 2: Selection and Iteration
How many times is "Hello" printed by the following code? for (int i = 1; i…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1062

Multiple choice Unit 2: Selection and Iteration
Consider the following code segment. What is the final value of product? int…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1063

Multiple choice Unit 2: Selection and Iteration
A method is intended to return the largest digit in an…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1064

Multiple choice Unit 2: Selection and Iteration
What is printed by the following code? int x = 5; if (x > 3) { if (x > 7)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1065

Multiple choice Unit 2: Selection and Iteration
What is the output of this code segment? int a = 3, b = 7;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1066

Multiple choice Unit 2: Selection and Iteration
What is the value of result after the following executes? String result = "";…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1067

Multiple choice Unit 2: Selection and Iteration
What is the value of sum after the following executes? int sum =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1068

Multiple choice Unit 2: Selection and Iteration
Which of the following boolean…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1069

Multiple choice Unit 2: Selection and Iteration
Consider the following code: int count = 0; for (int i = 0; i < 4; i++) { for…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1070

Multiple choice Unit 2: Selection and Iteration
What is the output of the following code? int n = 4; for (int i = 1; i <= n; i++)…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 1,061 of 3,140
Page 107 of 314