X Tutup
Skip to content

Commit eafe82b

Browse files
committed
no message
1 parent c38c1b8 commit eafe82b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

notes/JavaArchitecture/01 Java 基础.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,16 +1136,16 @@ strictfp 关键字可应用于类、接口或方法。使用 strictfp 关键字
11361136

11371137
- 4类8种基本数据类型。4整数型,2浮点型,1字符型,1布尔型
11381138

1139-
| 数据类型 | 存储需求 | 取值范围 | 默认值 | 对应包装类 |
1140-
| -------- | -------- | ------------------------------------------------------------ | --------------- | ---------- |
1141-
| byte | 8位 | 最大存储数据量是255,最小-2<sup>7</sup>,最大2<sup>7</sup>-1,即:[-128~127] | (byte) 0 | Byte |
1142-
| short | 16位 | 最大数据存储量是65536,[-2<sup>15</sup>,2<sup>15</sup>-1],±3万 [-32768,32767] | (short) 0 | Short |
1143-
| int | 32位 | 最大数据存储容量是2<sup>31</sup>-1,范围:[-2<sup>31</sup>,2<sup>31</sup>-1],±21亿[ -2147483648, 2147483647] | 0 | Integer |
1144-
| long | 64位 | 最大数据存储容量是2<sup>64</sup>-1,范围:[-2<sup>63</sup>,2<sup>63</sup>-1], ±922亿亿(±(922+16个零)) | 0L | Long |
1145-
| float | 32位 | 数据范围在3.4e-45~1.4e38,直接赋值时必须在数字后加上f或F | 0.0f | Float |
1146-
| double | 64位 | 数据范围在4.9e-324~1.8e308,赋值时可以加d或D也可以不加 | 0.0d | Double |
1147-
| boolean | 1位 | 只有true和false两个取值 | false | Boolean |
1148-
| char | 16位 | 存储Unicode码,用单引号赋值 | '\u0000' (null) | Character |
1139+
| 类型 | 存储 | 取值范围 | 默认值 | 包装类 |
1140+
| ------- | ---- | ------------------------------------------------------------ | --------------- | --------- |
1141+
| byte | 8位 | 最大存储数据量是255,最小-2<sup>7</sup>,最大2<sup>7</sup>-1,即:[-128~127] | (byte) 0 | Byte |
1142+
| short | 16位 | 最大数据存储量是65536,[-2<sup>15</sup>,2<sup>15</sup>-1],±3万 [-32768,32767] | (short) 0 | Short |
1143+
| int | 32位 | 最大数据存储容量是2<sup>31</sup>-1,范围:[-2<sup>31</sup>,2<sup>31</sup>-1],±21亿[ -2147483648, 2147483647] | 0 | Integer |
1144+
| long | 64位 | 最大数据存储容量是2<sup>64</sup>-1,范围:[-2<sup>63</sup>,2<sup>63</sup>-1], ±922亿亿(±(922+16个零)) | 0L | Long |
1145+
| float | 32位 | 数据范围在3.4e-45~1.4e38,直接赋值时必须在数字后加上f或F | 0.0f | Float |
1146+
| double | 64位 | 数据范围在4.9e-324~1.8e308,赋值时可以加d或D也可以不加 | 0.0d | Double |
1147+
| boolean | 1位 | 只有true和false两个取值 | false | Boolean |
1148+
| char | 16位 | 存储Unicode码,用单引号赋值 | '\u0000' (null) | Character |
11491149

11501150
- 引用数据类型
11511151
- 类(class)、接口(interface)、数组

0 commit comments

Comments
 (0)
X Tutup