java学习笔记4 - HashMap,LinkedHashMap,TreeMap对比(二)

2014-11-24 11:22:18 · 作者: · 浏览: 10
Key: c; Value: Level c
------有序(根据输入的顺序输出)------
Key: 1; Value: Level 1
Key: 2; Value: Level 2
Key: 3; Value: Level 3
Key: a; Value: Level a
Key: b; Value: Level b
Key: c; Value: Level c
4.小结:php的数组就是用hashmap实现的,所以学过php对hashmap就很容易理解,linkedhashmap跟php的数组实现的功能很像.