Question: Consider the following variable declarations: int x = 27; int y = 1; int z = 32; boolean b = false; What is the value
Consider the following variable declarations:
int x = 27;
int y = –1;
int z = 32;
boolean b = false;
What is the value of each of the following Boolean expressions?
a. !b
b. b || true
c. (x > y) && (y > z)
d. (x == y) || (x <= z)
e. !(x % 2 == 0)
f. (x % 2 != 0) && b
g. b && !b
h. b || !b
i. (x < y) == b
j. !(x / 2 == 13) || b || (z * 3 == 96)
k. (z < x) == false
l. !((x > 0) && (y < 0))
Step by Step Solution
3.41 Rating (160 Votes )
There are 3 Steps involved in it
Results of boolean expr... View full answer
Get step-by-step solutions from verified subject matter experts
