Java Data Type Tutorial - Java Double.isNaN(double v)








Syntax

Double.isNaN(double v) has the following syntax.

public static boolean isNaN(double v)

Example

In the following code shows how to use Double.isNaN(double v) method.

public class Main {
  public static void main(String[] args) {
    Double double1 = new Double(0.0/0.0);
    
    System.out.println(Double.isNaN(double1));

  }
}

The output: