package com.coding;
import java.util.*;
public class Test {
public static void main(String[] args) {
// Map<String,String> map = new HashMap<>();
// map.put("bbb","bb");
// map.put("aaa","aa");
// map.put("ccc","cc");
// map.put("ddd","dd");
// System.out.println(map);
// {aaa=aa, ccc=cc, bbb=bb, ddd=dd}
// Map<String,String> map = new TreeMap<>();
// map.put("bbb","bb");
// map.put("aaa","aa");
// map.put("ccc","cc");
// map.put("ddd","dd");
// System.out.println(map);
// {aaa=aa, bbb=bb, ccc=cc, ddd=dd
Map<String,String> map = new LinkedHashMap<>();
map.put("bbb","bb");
map.put("aaa","aa");
map.put("ccc","cc");
map.put("ddd","dd");
System.out.println(map);
}
}
标签:aa,map,cc,bbb,put,集合,ddd
From: https://www.cnblogs.com/dongyaotou/p/18303535