公共类Java的8种基本数据类型{
包com;
静态字节b;
static short s;
静态输入I;
静态长l;
静态浮动f;
静态双精度d;
静态字符c;
静态布尔博;
publicstaticvoidmain (string [ ] args ) {
system.out.println('byte的大小: ' Byte.SIZE
'; 默认值: ' b
'; 数据范围: " byte.min _ value "-" byte.max _ value "
system.out.println('short大小: ' Short.SIZE
'; 默认值: ' s
'; 数据范围: short.min _ value-short.max _ value
system.out.println('int大小: ' Integer.SIZE
'; 默认值: ' I
'; 数据范围: integer.min _ value-integer.max _ value
system.out.println('long的大小: ' Long.SIZE
'; 默认值: ' l
'; 数据范围: long.min _ value-long.max _ value
system.out.println('float大小: ' Float.SIZE
'; 默认值: ' f
'; 数据范围: float.min _ value-float.max _ value
system.out.println('double大小: ' Double.SIZE
'; 默认值: ' d
'; 数据范围: " double.min _ value "-" double.max _ value "
system.out.println('char大小: ' Character.SIZE
'; 默认值: ' c
'; 数据范围: character.min _ value-character.max _ value
system.out.println('boolean大小: ' Byte.SIZE
'; 默认值: ' bo
'; 数据范围: " byte.min _ value "-" byte.max _ value "
}
}