Question:
Which of the following is not a valid boolean expression?
2009-09-26 13:50:57 UTC
Which of the following is not a valid boolean expression?

A. A byte variable containing the value 0 or the value 1
B. 11 < 5
C. The literal true
D. myString.equals(myOtherString), where myString and myOtherString are initialized variables of type String
Four answers:
2009-09-27 02:16:38 UTC
Hm....



















***Boolean expr: just only true or false condition.



A. a byte containing value from 0 ... 255 (unsigned), but a bit containing value 0 or 1.

B. 11 < 5, result false.

C. true, result true.

D. myString equals myOtherString, result true or false.



A not a boolean expr.
Mark aka jack573
2009-09-30 07:19:00 UTC
Since this question is for the Java programming, the only answer that is applicable is:



A. A byte variable containing the value 0 or the value 1
ぴーちゃn
2009-09-26 20:55:56 UTC
d.



b is a valid boolean expression. Right 11 is not less than 5, which would return a false value.
GeeMail
2009-09-26 20:54:48 UTC
I'd say B





11 is not less than 5


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...