Rule of thumb for choosing an implementation of a Java Collection?

前端 未结 11 1499
执念已碎
执念已碎 2020-11-29 16:06

Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set?

For example, generally why or i

11条回答
  •  春和景丽
    2020-11-29 16:56

    I really like this cheat sheet from Sergiy Kovalchuk's blog entry:

    Java Map/Collection Cheat Sheet

    More detailed was Alexander Zagniotov's flowchart, but unfortunately it is offline. However, the Wayback Machine has a copy of the blog:

提交回复
热议问题