Verityprep
Question Bank · Unit 2

AP® Computer Science A Selection and Iteration Practice Questions

Work through AP Computer Science A practice 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.

Subtopic: Boolean Expressions Clear filter

Questions 41–50 of 357
  1. 41
  2. 42
  3. 43
  4. 44
  5. 45
  6. 46
  7. 47
  8. 48
  9. 49
  10. 50

Question 41

Multiple choice Boolean Expressions
What is the proper way to…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 42

Multiple choice Boolean Expressions
Reference equality uses the equality operator (==) and…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 43

Multiple choice Boolean Expressions
Logical equality compares…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 44

Multiple choice Boolean Expressions
Which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 45

Multiple choice Boolean Expressions
What will this code output? if (true && true && false) { System.out.println("Hello…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 46

Multiple choice Boolean Expressions
What will this program print if the value of grade is 80? if(grade > 90) { System.out.println("A");…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 47

Multiple choice Boolean Expressions
What will the values of x and y be after this code segment runs? int x = 100; int y =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 48

Multiple choice Boolean Expressions
Assuming a and b are properly initialized boolean values,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 49

Multiple choice Boolean Expressions
A student is trying to determine if the following two expressions are equivalent. A. x && (!x ||…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 50

Multiple choice Boolean Expressions
Given a, b, and c are properly initialized boolean values, what values…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 41 of 357
Page 5 of 36