无序hashset与hashmap让其有序

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

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


HashSet的内容如何排序

HashSet和TreeSet 

posted @   xwdreamer  阅读(2850)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示