Java Collection Comparison

The choosing the right collection for a particular programming tasks can make the difference between a simple program and a complex one. Below is an overview of Java Collections and their characteristics.

CollectionDescriptionOrderedChangeableAllow Duplicates
SetNoYesNo
unmodifiableSetNoNoNo
ListYesYesYes
ImmutableListYesNoYes
MapAssociate keys to valuesNoYesNo (keys)
ImmutableMapAssociate keys to valuesNoNoNo (keys)
Queuefirst-in, first-outYes

For comparison, see Python Collection Comparison.