Skip to content

Commit b217bff

Browse files
committed
💬 update LinkedHashMap
1 parent 7bd1b35 commit b217bff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MD/collection/LinkedHashMap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# LinkedHashMap 底层分析
22

3-
众所周知 `HashMap` 是一个无序的 `Map`,因为每次根据 `key``hashcode` 映射到 `Entry` 数组上,所以遍历出来的顺序并不是写入的顺序。
3+
众所周知 [HashMap](https://github.com/crossoverJie/Java-Interview/blob/master/MD/HashMap.md) 是一个无序的 `Map`,因为每次根据 `key``hashcode` 映射到 `Entry` 数组上,所以遍历出来的顺序并不是写入的顺序。
44

55
因此 JDK 推出一个基于 `HashMap` 但具有顺序的 `LinkedHashMap` 来解决有排序需求的场景。
66

@@ -122,7 +122,7 @@
122122
}
123123
```
124124

125-
可以看到里面有一个空的 `init()`具体是有 `LinkedHashMap` 来实现的:
125+
可以看到里面有一个空的 `init()`具体是由 `LinkedHashMap` 来实现的:
126126

127127
```java
128128
@Override

0 commit comments

Comments
 (0)