collection map

I was reading folowing lines. And I did not understand clearly.
map combination of list and set. what it exactly means

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
LVL 7
gudii9Asked:
Who is Participating?
 
for_yanCommented:
List is a collection with associated order and with posibbly duplicated elements
Set is a collection without order and which has no duplicate elements

Map is made up of collection keys - these cannot have duplicate elements
and in therefre they form a set (hence the method map.keySet()) - and
collection ov vlaues - these can have duplicates - so they form a list
Therefore Map cariies within itself  a Set of keys and a List of values
In this sense it is a combination of Set and List with defined correspondence of elements

0
 
cmalakarCommented:
List - a collection of elements. (even it can store duplicate elements)
Set - a collection of unique elements. Does not allow duplicate elements.
Map - a collection of key value pairs, in which it doesn't allow duplicate keys.

Map and Set/List has lots of differences.

Where did you read this ? what is the context of this line ?
0
 
cmalakarCommented:
Check this for definitions of various collection interfaces..

http://download.oracle.com/javase/tutorial/collections/interfaces/index.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.