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);
    //from w  w  w  .  j a va2  s.  c  om

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

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable