[转]java指数表示最大数和最小数
觉得有用的话,欢迎一起讨论相互学习~
public class MaxMinFloatDouble {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
float fmax = Float.MAX_VALUE;
float fmin = Float.MIN_VALUE;
double dmax = Double.MAX_VALUE;
double dmin = Double.MIN_VALUE;
System.out.println(fmax);
System.out.println(fmin);
System.out.println(dmax);
System.out.println(dmin);
/*result:
3.4028235E38
1.4E-45
1.7976931348623157E308
4.9E-324*/
}
}