An study of ~11k GitHub projects that looks at the popularity of classes in the Java Collections Framework. ▫️47% ArrayList ▫️21% HashMap ▫️10% HashSet ▫️5% LinkedList ▫️17% Everything else I thought TreeMap would be higher since it’s pretty useful. bit.ly/3E6CSZy
7
58
252
0
42
Download Image
@JavaCodeDaily I find that few developers appreciate TreeMap, TreeSet, LinkedHashSet
@JavaCodeDaily In most scenarios, an ordered dictionary is unnecessary
@JavaCodeDaily @RichardWarburto I use TreeMap and TreeSet constantly, and their second-class status in the JDK really shows. No SortedSet::of, no Collectors::toSortedSet, no way to make a TreeSet with a comparator and elements in a single expression, etc.