dagblog.
← Archive

The basics of Java collections


The collection family (java.util.Collection) turns up practically everywhere in Java programming. Some of its ground rules and gotchas are buried in the Javadoc, which, unfortunately, not everyone reads or fully understands. The usual points worth knowing are hashCode, capacity, load factor, and collisions.

These properties come up in both map and list implementations, so it pays to understand them in general. An accessible guide is Jack Shirazi's An Introduction to Java Map Collection Classes

Related articles

Medium version

Related articles

Related CZ Podcast episodes