Stable sort
Also known as: Stability, Sorting stability
A stable sort preserves the relative order of equal keys. If two records share a key and $A$ appeared before $B$ in the input, $A$ still appears before $B$ after sorting.
Stability matters when you sort on one field, then another: a stable secondary sort keeps the primary order among ties. Merge sort, insertion sort, counting sort, and timsort are typically stable. Naive quicksort and heapsort are not.
In APIs, check the docs: Collections.sort / Arrays.sort for objects is often a stable timsort; primitive sorts may trade stability for speed.