Java vs map collections within collections

According to http://docs.oracle.com/javase/tutorial/collections/interfaces/index.html there are two top-level interfaces called assembly and map.

What is the specific reason for separating the two?

Is it that all key-value data structures implement the map interface, and all others implement the collections interface?

+5
source share
2 answers

Yes, it's right! Check all classes Listand then check all related classes Map.

and there is this amazing discussion about this issue

List versus map in Java

Visually

This is a collection , so you know that there are books, and it’s in order, like 0,1,2,3 ...

enter image description here

, , , .

enter image description here

+18

A Map - , . A Collection - .

List a Map, . SO .

+5

All Articles