-1

I'm new to this, so wondering if someone could please advise why isNaN() is undefined?

package nan;

public class nan {

    public static void main(String[] args) {
        
       {
           if (isNaN(1))
           {System.out.println("true");}
       
    };

    }
}

thanks

Amaranth
  • 33
  • 5

1 Answers1

1

You want Double.isNaN or Float.isNaN in Java.

iota
  • 34,586
  • 7
  • 32
  • 51