Differences between HashList and HashMap, Set and List

Showing Answers 1 - 6 of 6 Answers

Ashutosh Gupta

  • Jun 26th, 2005

Hashtable is synchronised and Hashmap is not. 
List allow duplicate entries but Set does not allow.

  Was this answer useful?  Yes

Srinivasa Reddy

  • Aug 4th, 2005

Hashmap allows null values as key but Hashtable does not. 
List can store ordered elements and duplicates. 
Set can't allow duplecates and the order is unordered.

  Was this answer useful?  Yes


  • Sep 1st, 2005

HashMap is same as HashTable except that it is not Synchronized and allow null values. 
List is an ordered collection and it allow nulls and duplicates in it. Set doesn't allow duplicates, it may allow nulls. 
I am not getting what is HashList here.

  Was this answer useful?  Yes


  • Sep 29th, 2005

HashList is a data structure storing objects in a hash table and a list.it is a combination of hashmap and doubly linked list. acess will be faster. HashMap is hash table implementation of map interface it is same as HashTable except that it is unsynchronized and allow null values.     List is an ordered collection and it allow nulls and duplicates in it. positional acess is possible.                                                       Set is a collection that doesn't allow duplicates, it may allow at most one null element. same as our mathematical set.

  Was this answer useful?  Yes


  • Jun 2nd, 2008

HashMap is an unordered and unsorted map. Allow one null key and many null values.

Lists are collections that maintain their elements in order, and can contain duplicates.

Set interface do not allow duplicate elements. A set can contain at most one null value.A Set  is an unordered collection of distinct objects

  Was this answer useful?  Yes


  • Jun 23rd, 2010

Hashtable is syncronised where as HashMap is not. Hence, HashMap is faster.
Hasttable does not allow any null value as either key or value. However, HashMap allows multiple null values and one null as a key.

Set has no duplicate items and allows only one null element.
List might have duplicate items and allows multiple null element.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account

Send   Reset


Related Answered Questions


Related Open Questions