Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee4db29

Browse files
Merge pull request #92 from tuxiantian/patch-1
Update iterate-through-a-hashmap.md
2 parents dd738b3 + 77a1c0f commit ee4db29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contents/iterate-through-a-hashmap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HashMap遍历 #
22

3-
在Java中有多种遍历HashMAp的方法。让我们回顾一下最常见的方法和它们各自的优缺点。由于所有的Map都实现了Map接口,所以接下来方法适用于所有Map(如:HaspMap,TreeMap,LinkedMap,HashTable,etc)
3+
在Java中有多种遍历HashMap的方法。让我们回顾一下最常见的方法和它们各自的优缺点。由于所有的Map都实现了Map接口,所以接下来方法适用于所有Map(如:HaspMap,TreeMap,LinkedMap,HashTable,etc)
44

55
## 方法#1 使用For-Each迭代entries ##
66

@@ -74,4 +74,4 @@
7474
如果你只需要使用key或者value使用方法#2,如果你坚持使用java的老版本(java 5 以前的版本)或者打算在迭代的时候移除entries,使用方法#3。其他情况请使用#1方法。避免使用#4方法。
7575

7676
stackoverflow链接:
77-
http://stackoverflow.com/questions/1066589/iterate-through-a-hashmap
77+
http://stackoverflow.com/questions/1066589/iterate-through-a-hashmap

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /