หน้าเว็บ

วันอังคารที่ 15 พฤษภาคม พ.ศ. 2555

HashMap Vs HashTable Vs TreeMap Vs LinkedHashMap

from http://vidyapsi.wordpress.com/2009/01/22/hashmap-vs-hashtable-vs-treemap-vs-linkedhashmap/

HashMap Vs HashTable Vs TreeMap Vs LinkedHashMap

Posted by vidya on January 22, 2009
HashMapHashTableTreeMapLinkedHashMap
public class HashMap<K,V>
extends AbstractMap<K,V>
implements Map<K,V>,
 Cloneable,
 Serializable
public class Hashtable<K,V>
extends Dictionary<K,V>
implements Map<K,V>, 
Cloneable,
 Serializable
public class 
TreeMap<K,V>
extends
AbstractMap<K,V>
implements
 NavigableMap<K,V>,
Cloneable
Serializable
public class
LinkedHashMap<K,V>
extends HashMap<K,V>
implements Map<K,V>
Unidentified OrderDecending OrderAscending OrderInsertion Order
UnSynchronizedSynchronizedUnSynchronizedUnSynchronized
The values can be null. But the key should be uniquedoes not let you have null value for key.The values can be null. But the key should be uniqueThe values can be null. But the key should be unique

ไม่มีความคิดเห็น:

แสดงความคิดเห็น