Arrgh.  I meant to say "whenever n is NOT 0".

Spencer W. Thomas wrote:


[EMAIL PROTECTED] wrote:

No. I'm assuming you are trying to say "if (n is less than or not equal to 0)...."
You can try this instead:

int n={some integer};

if (n < 0 || n != 0)
System.out.println("foo happens here");
else
System.out.println("bar happens here");

Try this.  It will print "foo happens here" only when n is 0.


However, a clearer way to code it is this:

  if (n >= 0)
    System.out.println("bar happens here");
  else
    System.out.println("foo happens here");
____________________________________________________



____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________


____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to