无序hashset与hashmap让其有序

http://blog.csdn.net/RabbitEatPumpkin/article/details/4730544

今天迭代hashmap时,hashmap并不能按照put的顺序,迭代输出值。用下述方法可以:


HashSet的内容如何排序

HashSet和TreeSet 

posted @ 2011-11-23 18:50  xwdreamer  阅读(2845)  评论(0编辑  收藏  举报