troubleshooting Question

"NaN" in Java

Avatar of techbro
techbroFlag for United States of America asked on
Java
8 Comments3 Solutions1159 ViewsLast Modified:
I am taking a java mock exam in my exam simulator - enthuware. I am studying for a certification exam. I have approached this problem about "NaN", which I am not familiar with.

The Question is:

Which of the following statements about NaNs are true ?
A. Float.NaN == Float.NaN
B. Float.NaN == Double.NaN
C. Float.NaN >= 0
D. Float.NaN < 0
E. None of the above.

Here, Option E is the correct answer according to the exam simulator.

Since NaN means "Not a Number", it is obvious that C and D are incorrect. But I need to know why option A is not correct in this problem?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros