-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
  • 55
  • 1
  • 10

1 Answers1

1

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

Unmitigated
  • 76,500
  • 11
  • 62
  • 80