map只是一个接口,他的实现类中
HashMap是无序的(只是说不是你插入时的顺序);
LinkedHashMap是有序的(按你插入的顺序);
TreeMap 是按key排序的;
HashMap 类基本上等同于 Hashtable, 区别仅仅在于: HashMap 不是同步的,并且运行 null 值.。
map只是一个接口,他的实现类中
HashMap是无序的(只是说不是你插入时的顺序);
LinkedHashMap是有序的(按你插入的顺序);
TreeMap 是按key排序的;
HashMap 类基本上等同于 Hashtable, 区别仅仅在于: HashMap 不是同步的,并且运行 null 值.。