Re: Simple syntax question



On Thu, 28 Feb 2008 19:58:23 -0500, somebody <some@xxxxxxxx> wrote,
quoted or indirectly quoted someone who said :

Is this the best we to conditionally do something if str is NOT equal to
one, two, three, or four, AND mystr is NOT equal to X? I can't seem to
find anything like a str.unequal. I want the if block to execute if str
equals "seven" and mystr equals "Y"

see http://mindprod.com/jgloss/booleannot.html

you have to say

if (! a.equal( b) )

Intellij Idea has a code simplifier that will take complicated boolean
expressions and convert them to various altervatives using the de
Morgan laws.

see http://mindprod.com/jgloss/intellij.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.