Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2004 18:40:36 +0200
From:      Thorsten Greiner <thorsten@tgreiner.net>
To:        Christopher Rued <c.rued@xsb.com>
Cc:        java@freebsd.org
Subject:   Re: EX-OR Boolean Operator in Java
Message-ID:  <20040521164036.GA782@tybalt.greiner.local>
In-Reply-To: <40AE1884.3090206@xsb.com>
References:  <7FF62A49079FD511B14400065B19EF120550B8A0@cprnt003.satyam.com> <40AE1884.3090206@xsb.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Christopher Rued <c.rued@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

--=20
You're not out of shape... because technically a circle is a shape.
=20
This message is digitally signed. To verify its integrity, download a copy
of GnuPG for your operating system from http://www.gnupg.org .

--5mCyUwZo2JvN/JJP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFArjEERThlmOhl9moRAikGAJ9ejNXzAXAvGG4pEkqytEbz/dcBwACeNeWN
bRhfv9y9DsCrHpe1EjYWpK4=
=cX2g
-----END PGP SIGNATURE-----

--5mCyUwZo2JvN/JJP--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040521164036.GA782>