Java double和float的范围

2019年2月11日21:38:41 发表评论 1,256 views
/**
 * Created by xabcd on 2019/2/11.
 */
public class Java_double_range
{public static void main(String args[])
{
    System.out.println("float_max ="+java.lang.Float.MAX_VALUE);
    System.out.println("float_min ="+java.lang.Float.MIN_VALUE);
    System.out.println("double_max="+java.lang.Double.MAX_VALUE);
    System.out.println("double_min="+java.lang.Double.MIN_VALUE);
}
}



结果:
float_max =3.4028235E38
float_min =1.4E-45
double_max=1.7976931348623157E308
double_min=4.9E-324

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: