Java Reference
In-Depth Information
Here is the output:
As you can see, the result of two XORs using the same key produces the decoded message.
The unary one's complement (NOT) operator reverses the state of all the bits of the oper-
and. For example, if some integer called A has the bit pattern 1001 0110, then ~A produces
a result with the bit pattern 0110 1001.
The following program demonstrates the NOT operator by displaying a number and its
complement in binary:
Here is the output:
Search WWH ::




Custom Search