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);
	}
}

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注