double型和float型都可以如下表示无穷大和无穷小
import static java.lang.Double.NEGATIVE_INFINITY;import static java.lang.Double.POSITIVE_INFINITY;
double max=POSITIVE_INFINITY;//无穷大double maxx=NEGATIVE_INFINITY;//无穷小