java语言求各个数据类型的最值

  • Post author:
  • Post category:java




java语言求各个数据类型的最值

public class value{
    public static void main(String[] args) {
        System.out.println("Intager Max:"+Integer.MAX_VALUE);
        System.out.println("Intager Min:"+Integer.MIN_VALUE);
        System.out.println("Long Max:"+Long.MAX_VALUE);
        System.out.println("Long Min:"+Long.MIN_VALUE);
        System.out.println("Short Max:"+Short.MAX_VALUE);
        System.out.println("Short Min:"+Short.MIN_VALUE);
        System.out.println("Float Max:"+Float.MAX_VALUE);        //标准化的最大值
        System.out.println("Float.MIN_NORMAL:"+Float.MIN_NORMAL);//标准化的最小值
        System.out.println("Float Min:"+Float.MIN_VALUE);        //非标准化的最小值
        System.out.println("Double Max:"+Double.MAX_VALUE);
        System.out.println("Double Min:"+Double.MIN_VALUE);
    }
}




结果集

Intager Max:2147483647
Intager Min:-2147483648
Long Max:9223372036854775807
Long Min:-9223372036854775808
Short Max:32767
Short Min:-32768
Float Max:3.4028235E38
Float.MIN_NORMAL:1.17549435E-38
Float Min:1.4E-45
Double Max:1.7976931348623157E308
Double Min:4.9E-324



版权声明:本文为qq_43738479原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。