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?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
This award recognizes a member of Experts Exchange who has made outstanding contributions to the community within their first year as an expert. The Rookie of the Year is awarded to a new expert who has the highest number of quality contributions.
This award recognizes a member of Experts Exchange who has made outstanding contributions to the community within their first year as an expert. The Rookie of the Year is awarded to a new expert who has the highest number of quality contributions.