1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update Java内存区域.md

This commit is contained in:
Kou Shuang 2019-09-16 22:58:14 +08:00
parent d9732e1617
commit 3bb6f59ac0

View File

@ -342,7 +342,7 @@ true
### 4.3 8 种基本类型的包装类和常量池
- **Java 基本类型的包装类的大部分都实现了常量池技术,即 Byte,Short,Integer,Long,Character,Boolean这 5 种包装类默认创建了数值[-128127] 的相应类型的缓存数据,但是超出此范围仍然会去创建新的对象。**
- **Java 基本类型的包装类的大部分都实现了常量池技术,即 Byte,Short,Integer,Long,Character,Boolean这 5 种包装类默认创建了数值[-128127] 的相应类型的缓存数据,但是超出此范围仍然会去创建新的对象。** 为啥把缓存设置为[-128127]区间?([参见issue/461](https://github.com/Snailclimb/JavaGuide/issues/461))性能和资源之间的权衡。
- **两种浮点数类型的包装类 Float,Double 并没有实现常量池技术。**
```java