Java基础类型对照表
数据类型 | 长度(位) | 默认值 | 封装类(都在java.lang包下) |
byte | 8 | (byte)0 | Byte |
short | 16 | (short)0 | Short |
int | 32 | 0 | Integer |
long | 64 | 0L | Long |
float | 32 | 0.0f | Float |
double | 64 | 0.0d | Double |
char | 16 | \u0000 | Character |
boolean | 1 | false | Boolean |