What is the difference between List, Set and Map

Showing Answers 1 - 4 of 4 Answers

Pattukkottai Arun

  • Jul 21st, 2005
 

A Set is a collection that has no duplicate elements.  
A List is a collection that has an order assoicated with its elements.  
A map is a way of storing key/value pairs. The way of storing a Map is similar to two-column table.

  Was this answer useful?  Yes

Vinay

  • Sep 4th, 2012
 

Adding couple of other differences between Set and Map:
1. You can have an iterator for a set but not a map.
2. Processing a complete map takes longer whereas processing a complete set takes a comparatively less time (reason - iterator)

  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.

 

Related Answered Questions

 

Related Open Questions