One thing I’ve always loved about Java is the java.util
and java.util.concurrent
data structures.
They’re predictable, stable, and multiple implementations of each data structure are often available.
Still, every so often I fall victim to a “gotcha.”
Java’s PriorityQueue
in particular makes it very easy to shoot oneself in the foot, an unusual trait for a Java standard library class.