Assume boolean variable a is true
and boolean variable b is false.
Would if (a && b) run the code in the if statement?
No - both variables need to be true for the if statement to run.
- Yes - at least one boolean is true so the whole statement is true.
- No - This code would produce an error.
- Yes - at least one boolean is false so the whole statement is true.
There are no hints for this question