Skip to content

Commit 4510c86

Browse files
committed
Update Java基础知识.md
1 parent b9c1a91 commit 4510c86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/Java基础知识.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ Java**中**有8种基本数据类型,分别为:
408408
409409
更多内容见:[深入剖析 Java 中的装箱和拆箱](https://www.cnblogs.com/dolphin0520/p/3780005.html)
410410
411-
#### 1.3.3. 种基本类型的包装类和常量池
411+
#### 1.3.3. 8种基本类型的包装类和常量池
412412
413413
**Java 基本类型的包装类的大部分都实现了常量池技术,即 Byte,Short,Integer,Long,Character,Boolean;前面 4 种包装类默认创建了数值[-128127] 的相应类型的缓存数据,Character创建了数值在[0,127]范围的缓存数据,Boolean 直接返回True Or False。如果超出对应范围仍然会去创建新的对象。** 为啥把缓存设置为[-128127]区间?([参见issue/461](https://github.com/Snailclimb/JavaGuide/issues/461))性能和资源之间的权衡。
414414

0 commit comments

Comments
 (0)