Skip to content

Glossary: Data Structures and Algorithms in Java

natural order

The way a type sorts itself by default, such as numbers smallest first and strings alphabetically. `list.sort(null)` and a `PriorityQueue` with no comparator use it.

Where the book teaches it

Related terms

Comparablecomparator