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








Syntax

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

public static boolean isInfinite(double v)

Example

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

public class Main {
  public static void main(String[] args) {
    Double double1 = new Double(1/0.0);
    

    System.out.println(Double.isInfinite(double1));

  }
}

The code above generates the following result.