EX-OR Boolean Operator in Java

Thorsten Greiner thorsten at tgreiner.net
Fri May 21 09:41:19 PDT 2004


* Christopher Rued <c.rued at xsb.com> [2004-05-21 18:31]:
> (a && !b) || (!a && b).
> There is no XOR boolean operator in Java, AFAIK.

Come on guys, think before you hit that send button: the boolean
operators in Java are:

    !   NOT
    &   AND
    |   OR
    ^   XOR

There are two short-ciruit operators:

    &&  AND
    ||  OR

These do not evaluate their right hand side expression if the left
side is either false (&&) or true (||). You actually should find
that in any entry level book on Java programming.

Regards
        -Thorsten

-- 
You're not out of shape... because technically a circle is a shape.
 
This message is digitally signed. To verify its integrity, download a copy
of GnuPG for your operating system from http://www.gnupg.org .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20040521/31a4218e/attachment.bin


More information about the freebsd-java mailing list