-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

2
  • 2
    What host environment are you using? System.out.println is not native JavaScript. Commented May 10, 2021 at 21:31
  • 2
    This looks rather like Java. Commented May 10, 2021 at 21:32

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.