键值key排序

来源:互联网 发布:python 驼峰命名 编辑:程序博客网 时间:2024/04/20 13:05

http://qixiaopeng.iteye.com/blog/411537

 

Map map = new HashMap(); 
map.put("4",   "a"); 
map.put("2",   "b"); 
map.put("1",   "c"); 
map.put("3",   "d");
 
第一种方法:


第二种方法: