Java基本数据类型四种八类
1、整数类型型:byte short int long
整 型: int;默认
长整型: long;
短整型: short;
字节型: byte;
2、浮点型: float(单精度型)
double(双精度型)默认
3、字符型: char
4、布尔类型: boolean true真 false假
类型 字节 位数 包装类型 默认值
byte 1 8 Byte 0
short 2 16 Short 0
char 2 16 Character ‘u\000’
int 4 32 Integer 0
float 4 32 Float 0.0f
long 8 64 Long 0L
double 8 64 Double 0.0d
boolean 1/4 Boolean false