double infinity = Double.POSITIVE_INFINITY; //defined as 1.0/0.0 Double.isInfinite(infinity); //true