zuai-logo
zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank

Boolean Logic & Conditional Statements

Question 1
college-boardComputer Science AAPExam Style
1 mark

What would be the result of the Boolean expression (7>3)(7 > 3)(7>3)?

Question 2
college-boardComputer Science AAPExam Style
1 mark

When chaining together multiple equality checks with logical ORs in Java (||) for different integer variables where two have equal value, what boolean result occurs?

Question 3
college-boardComputer Science AAPExam Style
1 mark

Given two variables boolean x = true; and boolean y = false;, what would be the result of (x || y) && !(x && y)?

Question 4
college-boardComputer Science AAPExam Style
1 mark

When checking if a string str is neither null nor empty using short-circuit evaluation, which expression is most efficient?

Question 5
college-boardComputer Science AAPExam Style
1 mark

What will the expression (7 >= 7) evaluate to?

Question 6
college-boardComputer Science AAPExam Style
1 mark

Which modification ensures that the boolean expression (a == b || c) evaluates as false only when both a != b and not-c are true?

Question 7
college-boardComputer Science AAPExam Style
1 mark

If x=−5x = -5x=−5, what does the expression (x<0)(x < 0)(x<0) evaluate to?

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
college-boardComputer Science AAPExam Style
1 mark

What alteration ensures that boolean expression !((!X)∣∣Y)!((!X) || Y)!((!X)∣∣Y) yields same result as X && (!Y) for all possible boolean values X,Y?

Question 9
college-boardComputer Science AAPExam Style
1 mark

What is the result of the boolean expression (10/5)==3(10 / 5) == 3(10/5)==3?

Question 10
college-boardComputer Science AAPExam Style
1 mark

What is the result of the boolean expression (6≤3)(6 \leq 3)(6≤3)?