I have prepared a cheat sheet that can help to select appropriate Map, Set or List implementation when required. Java API has many implementations of interfaces mentioned, and it is not always clear which implementation should be used in a particular scenario. The cheat sheet comes in the form of a flow chart, which makes it easy to follow and understand.
The idea was inspired by Sergiy Kovalchuk. Sergiy made a flow chart using the most commonly used collections. I tried to take it one step further and make it much more thorough. Please do let me know if anything needs to be corrected. I hope this can help developers out there to choose the right collection for the right job.
Inspired by Sergiy Kovalchuk

good work! thanks!
Pingback: Qual a melhor implementação de Collection e Mapas para o meu programa? « Blog do Erich
Pingback: Rendimiento de las APIs de collection de java | aninki.net
Pingback: Cheat sheet sobre el uso de Collections en Java | CyberHades
Hashtable is not sorted on the keys.
Hi Neil,
You are right. A pure Hashtable itself cannot be sorted, but the data within it can. In other words, it is possible to sort Hashtable keys. I guess I should have been more clearer in the diagram
Should it be used as a ‘cache’ or store construction expensive objects? Yes / No
Hmm, I don’t think yes/no are valid answers to this question
Otherwise great diargram!!
Thomas thank you
and yes – “yes/no” are not exactly valid here. But I was simply trying to keep the diagram consized, therefore I chose one of the main differences
This is very useful and very comprehensive. Thanks
Tim, I am happy it helped you