Unit 3: Boolean Expressions and If Statements
Showing 20 of 23 questions
What is the output of the following code?
What is the output of the following code?
Which of the following boolean expressions is equivalent to !(x >= 5 && x < 20)?
What is the output of the following code?
What is the output of the following code?
What is the output of the following code?
Given the method below, what is returned when isValid(15) is called?
What is the output of the following code?
What is the output of the following code?
Which of the following boolean expressions is equivalent to !(a && b)?
What is the output of the following code?
What is the value of !(true && false)?
What is printed?\nint x = 15;\nif (x > 20) System.out.print("A");\nelse if (x > 10) System.out.print("B");\nelse System.out.print("C");
Which expression is equivalent to !(a && b)?
Given: int x = 0; if (x != 0 && 10/x > 2) ... What happens?
What does == compare when used with two object references?
What is the output?\nint x = 5, y = 10;\nif (x > 3) if (y < 8) System.out.print("A"); else System.out.print("B");
The conditional expression (x > 0) ? "positive" : "non-positive" is equivalent to:
For what value of x is the expression (x > 5 && x < 10) true?
Which is equivalent to !(a || b)?
Advertisement