Map有:HashMap、TreeMap、Hashtable。
1、HashMap:线程不安全,键、值不允许为null,并且没顺序。
2、Hashtable:线程安全,键、值允许为null,并且没顺序。
3、TreeMap:线程不安全、键、值不允许为null,并且没顺序。
备注:当前用的最多的是HashMap,因为线性不安全,也就是说读取和存储效率要更高一些。
您好,提问者:
Map:HashMap、TreeMap、Hashtable。
1、HashMap:线程不安全,键、值不允许为null。
2、Hashtable:线程安全,键、值允许为null。
3、TreeMap:线程不安全、键、值不允许为null,底层二叉树。
AbstractMap, Attributes, AuthProvider, ConcurrentHashMap,
ConcurrentSkipListMap,
EnumMap, HashMap, Hashtable, IdentityHashMap, LinkedHashMap, PrinterStateReasons,
Properties,
Provider, RenderingHints, SimpleBindings, TabularDataSupport,
TreeMap, UIDefaults,
WeakHashMap