Booleans in Java
I am a beginner and started to learn the java language. I encountered a
problem in the book about booleans. I don't know how to find the value of
the questions and I was wondering if someone can give me a sample of how
the code is supposed to look like. Help would really be appreciated.
Question in the book:
Suppose the value of b is false and the value of x is 0. What is the value
of each of the following expressions a) b && x == 0
b) b || x == 0
c) !b && x == 0
d) !b || x == 0
e) b && x != 0
f) b || x != 0
g) !b && x != 0
h) !b || x != 0
I just don't know how I would execute this problem, help! Thanks
No comments:
Post a Comment