Multiple choice technology programming languages

Which one is not correct A. x = = Float.NaN B. Float.isNan(x); C. Myobject .equals(float.NaN);

  1. A

  2. B

  3. Both

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Comparing with Float.NaN using == always returns false (even Float.NaN == Float.NaN is false by IEEE 754). Float.isNaN(x) is the correct way to check. The claimed answer B is correct.