java 集合按照ASCII码从小到大(顺序)排序


import java.util.SortedMap;
import java.util.TreeMap;
 
public class TestTreeMap {
	public static void main(String[] args) {
	SortedMap <String, Object> params = new TreeMap <>();
 
        params.put("ZKK", "15");
        params.put("AT", "1525524700740");
        params.put("NONCESTR", "1522115166482");
        params.put("PASSWORD", "123456");
        params.put("PHONEID", "android");
        params.put("PHONEIP", "PHONEIP");
        params.put("USERNAME", "13800000001");
        params.put("APPID", "A80C1A90A90C4260B52CB8FE559F70BD");
        
        System.out.println(params);
	}
}
posted @ 2020-11-02 16:08  tujietg  阅读(2955)  评论(0编辑  收藏  举报