RSS feed [root] /hacks /java /weblog




login:

password:

title search:




 


Sat Nov 11 10:03:05 GMT 2006

bitwise operation on boolean



bitwise operation on boolean

The solution to the puzzle is given in the Java Language Specification, chapter 15.22.2:
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.

http://beust.com/weblog/archives/000350.html

Someone mentioned that there is no boolean, byte and short in byte code level, all just integer
http://oddjava.com/?q=node/8


(google search) (amazon search)
second
download zip of files only