Java 基本数据类型及长度

2014-07-27· 1810 次浏览
| 类型 | 大小 | 最小值 | 最大值 | | --- | --- | --- | --- | | boolean | \-\-\-\-\- | \-\-\-\-\- | \-\-\-\-\- | | char | 16-bit | Unicode 0 | Unicode 2^16-1 | | byte | 8-bit | -128 | +127 | | short | 16-bit | -2^15 | +2^15-1 | | int | 32-bit | -2^31 | +2^31-1 | | long | 64-bit | -2^63 | +2^63-1 | | float | 32-bit | IEEE754 | IEEE754 | | double | 64-bit | IEEE754 | IEEE754 |