0
How Can I use NaN and infinity in Java
http://ideone.com/NXG2b2 code link. help me to solve this. how can I use NaN and infinity in if else to print something for NaN and infinity value
5 Answers
+ 2
Did you fix it? I don't see an error.
Which line?
+ 1
Nan isn't defined, you have to grab it from the double class.
Like so:
if(R1 != Double.NaN || R1 != Double.NEGATIVE_INFINITY)
0
Thanks
0
would you help me again? I got stuck with boolean oparator.
would you this out? and what to do now? >> http://ideone.com/NXG2b2
0
It Showed bad operand. I solve this but now stuck with results. I will seek
your help I can't fix it.