|
最初由 yining 发布
[B]
15.22.2 Boolean Logical Operators &, ^, and |
When both operands of a &, ^, or | operator are of type boolean, then the type of the bitwise operator expression is boolean.
For &, the result value is true if both operand values are true; otherwise, the result is false.
For ^, the result value is true if the operand values are different; otherwise, the result is false.
For |, the result value is false if both operand values are false; otherwise, the result is true.
这个是从Java Language Specification抄来的。bitwise operator当然有可能,不过和一个logical operator比较,有点不着边际,所以我觉得原来的用意应该是比较两种logical operator的区别。 [/B]
这个好像并没有证明“&会判断所有条件”呀 |
|