Sep 14, 2018

Double infinity in Java

Initialize a double variable to infinity in Java

Java has built-in constants available for this purpose: Double.POSITIVE_INFINITY and Double.NEGATIVE_INFINITY.