File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ jshell 是 Java 9 新增的一个实用工具。为 Java 提供了类似于 Pyth
6060``` java
6161List . of(" Java" , " C++" );
6262Set . of(" Java" , " C++" );
63- Map . of(" Java" , 1 , " C++" , 2 )` ;
63+ Map . of(" Java" , 1 , " C++" , 2 );
6464```
6565
6666使用 ` of() ` 创建的集合为不可变集合,不能进行添加、删除、替换、 排序等操作,不然会报 ` java.lang.UnsupportedOperationException ` 异常。
@@ -945,4 +945,4 @@ Java 15 并没有对此特性进行调整,继续预览特性,主要用于接
945945- Oracle Java14 record < https://docs.oracle.com/en/java/javase/14/language/records.html >
946946- java14-features < https://www.techgeeknext.com/java/java14-features >
947947- Java 14 Features : < https://www.journaldev.com/37273/java-14-features >
948- - What is new in Java 15: https://mkyong.com/java/what-is-new-in-java-15/
948+ - What is new in Java 15: https://mkyong.com/java/what-is-new-in-java-15/
You can’t perform that action at this time.
0 commit comments