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 721–730 of 2,811
  1. 721
  2. 722
  3. 723
  4. 724
  5. 725
  6. 726
  7. 727
  8. 728
  9. 729
  10. 730

Question 721

Multiple choice Unit 2: Selection and Iteration
Assume that x and y have been declared and initialized with int values. Consider the following Java…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 722

Multiple choice Unit 2: Selection and Iteration
Assume that int variables x and y have been properly declared and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 723

Multiple choice Unit 2: Selection and Iteration
Why do we use…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 724

Multiple choice Unit 2: Selection and Iteration
What will this while loop do?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 725

Multiple choice Unit 2: Selection and Iteration
Why does the following code produce an infinite loop? Choose the best answer. public…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 726

Multiple choice Unit 2: Selection and Iteration
Which statement could be added to the while loop below so that it doesn't run indefinitely?…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 727

Multiple choice Unit 2: Selection and Iteration
What does the following code print? int x = -4;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 728

Multiple choice Unit 2: Selection and Iteration
How many times will the following code print out the value of x? public static…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 729

Multiple choice Unit 2: Selection and Iteration
Which for loop will…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 730

Multiple choice Unit 2: Selection and Iteration
Why do we use…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 721 of 2,811
Page 73 of 282