Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions on Selection and Iteration, 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 71–80 of 692
  1. 71
  2. 72
  3. 73
  4. 74
  5. 75
  6. 76
  7. 77
  8. 78
  9. 79
  10. 80

Question 71

Multiple choice Boolean Expressions
Consider the code snippet below. String name = "Karel"; String checkName = new String("Karel"); boolean nameMatches = name == checkName; Note that we forced…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 72

Multiple choice Boolean Expressions
What is the…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 73

Multiple choice Boolean Expressions
Which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 74

Multiple choice Boolean Expressions
Why do we use if…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 75

Multiple choice Boolean Expressions
Which if statement…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 76

Multiple choice Boolean Expressions
What is the output of this program? int phLevel = 9; if(phLevel < 7) { System.out.println("It is acidic!"); }…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 77

Multiple choice Boolean Expressions
What is the output of this program? int numTreeRings = 50; System.out.println("How old is the tree?"); if(numTreeRings < 20) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 78

Multiple choice Boolean Expressions
Consider the following code snippet if (x == y) { // Statement A } else…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 79

Multiple choice Boolean Expressions
Consider the following code snippet if (x == y) { // Statement A } else…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 80

Multiple choice Boolean Expressions
Choose the answer that will always produce the same output as the if-else statement below. Assume that grams is an int variable that has been declared and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 71 of 692
Page 8 of 70