System.out.println("--------JDK1.8中数字范围测试----");
System.out.println("int 最小值的常量:"+iMin); //左边界大概范围:-Math.pow(10,9); 21474 83647
System.out.println("int 最大值的常量:"+iMax); //右边界大概范围:+Math.pow(10,9);
System.out.println("long 最小值的常量:"+lMin);//左边界大概范围:-Math.pow(10,17) 9223 37203 68547 75808
System.out.println("long 最大值的常量:"+lMax);//右边界大概范围:+Math.pow(10,17)
System.out.println("float 最小正非零值的常数:"+fMin);//左边界大概范围:-Math.pow(10,38)
System.out.println("float 最大正非零值的常数:"+fMax);//右边界大概范围:+Math.pow(10,38)
System.out.println("double 最小正非零值的常数:"+dMin);//左边界大概范围:-Math.pow(10,308)
System.out.println("double 最大正非零值的常数:"+dMax);//右边界大概范围:+Math.pow(10,308)
//test
System.out.println("------------------------------");
float negF=-3.4028235E38F;
System.out.println("最小float值:"+negF);
double negD=-1.7976931348623157E308D;
System.out.println("最小double值:"+negD);
}
}
-149. It is equal to the
* hexadecimal floating-point literal {@code 0x0.000002P-126f}
* and also equal to {@code Float.intBitsToFloat(0x1)}.
*/
public static final float MIN_VALUE = 0x0.000002P-126f; // 1.4e-45f (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|