471,853 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

How do I check if whether a double is NEGATIVE in java ?

How do I check if whether a double is NEGATIVE in java ?
Nov 28 '08 #1
3 15244
188 100+
Any negative number is less than zero.


Nov 28 '08 #2
11,448 Expert 8TB
Keep it close to a positive double; if they go *poof!* and are both gone afterwards your double was negative; otherwise you have two positive doubles at best.

kind regards,

Jos ;-)
Nov 28 '08 #3
3,112 Expert 2GB
Or ask it: "Is the glass half full or half empty" and if it answers "half empty", then it's certainly negative. ;-)

Nov 28 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Siu | last post: by
12 posts views Thread by foolsmart2005 | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.